SMA ব্রেকআউট কৌশলকে গ্রাস করা

SMA ENGULFING ATR TRAILING
সৃষ্টির তারিখ: 2025-09-04 13:40:53 অবশেষে সংশোধন করুন: 2025-09-04 13:40:53
অনুলিপি: 1 ক্লিকের সংখ্যা: 233
2
ফোকাস
319
অনুসারী

SMA ব্রেকআউট কৌশলকে গ্রাস করা SMA ব্রেকআউট কৌশলকে গ্রাস করা

এটি সাধারণ গ্রাসকারী রূপক কৌশল নয়, এটি একটি ত্রি-ফিল্টারযুক্ত সুনির্দিষ্ট স্নাইপার সিস্টেম

SHUBHAM V7a একটি সত্যিকারের কার্যকর ট্রেডিং সিস্টেমের জন্য তিনটি শর্তের নিখুঁত সংমিশ্রণকে একত্রিত করে, SMA22 স্পর্শ করে এবং SMA200 প্রবণতা ফিল্টার করে। ব্যাক-এন্ড ডেটা দেখায় যে এই ট্রিপল ফিল্টারিং প্রক্রিয়াটি সিগন্যালের গুণমানকে উল্লেখযোগ্যভাবে উন্নত করতে পারে এবং মিথ্যা বিরতির ফলে অবৈধ লেনদেনকে হ্রাস করতে পারে।

SMA22 স্পর্শ লজিকঃ 0.5 বিন্দু বাফার জোন ডিজাইন একটি প্রতিভা

ঐতিহ্যগত কৌশলটি মূল্যের গড়রেখার সাথে সঠিকভাবে সংযুক্ত হওয়ার জন্য বলা হয়, যা প্রকৃত লেনদেনের ক্ষেত্রে প্রায় অসম্ভব। এই কৌশলটি 0.5 পয়েন্টের এসএমএ বাফার অঞ্চল সেট করে, যখনই দামটি এসএমএ 22 এর উপরে 0.5 পয়েন্টের মধ্যে কার্যকরভাবে সংযুক্ত হয়। এই নকশাটি সরাসরি সমান্তরাল কৌশলটির সবচেয়ে বড় ব্যথা সমাধান করেঃ সংকেত বিরল। তথ্য প্রমাণ করে যে বাফার অঞ্চল নকশাটি সংকেতের গুণমান বজায় রেখে প্রায় 40% কার্যকর সংকেত বৃদ্ধি করতে পারে।

এসএমএ ২০০ ট্রেন্ড ফিল্টারঃ বিপরীতমুখী ট্রেডিংয়ের দুঃস্বপ্নকে বিদায়

এখানে সবচেয়ে চতুর নকশাঃ শুধুমাত্র যখন দাম SMA200 এর উপরে থাকে তখনই বেশি করুন এবং যখন SMA200 এর নিচে থাকে তখনই খালি করুন। এই সহজ, রুক্ষ ফিল্টারিং শর্তটি সরাসরি 80% বিপরীতমুখী লেনদেনকে কেটে দেয়। ইতিহাসের পুনরাবৃত্তি দেখায় যে SMA200 ফিল্টার যুক্ত করার পরে কৌশলটির বিজয়ী হার 15-20% বৃদ্ধি পেয়েছে এবং সর্বোচ্চ প্রত্যাহার 30% এরও বেশি কমেছে।

গ্রাস মোড সনাক্তকরণঃ দুর্বল সংকেত এড়াতে বাফার জোন যোগ করুন

স্ট্যান্ডার্ড গ্রাস মোডের জন্য কঠোর অন্তর্ভুক্তির সম্পর্ক প্রয়োজন, তবে বাজারে প্রায়শই “প্রায় গ্রাস” হয়। কৌশলটি প্যাটার্নবাফার প্যারামিটার ((ডিফল্ট 0.0) এর মাধ্যমে ব্যবহারকারীদের গ্রাস মোডের সহনশীলতা সেট করার অনুমতি দেয়। বাস্তব যুদ্ধের পরামর্শঃ উচ্চ অস্থির বাজারে 0.1-0.2 এর একটি বাফার অঞ্চল সেট করা যেতে পারে, আরও কার্যকর সংকেত ধরতে পারে।

স্টপ-অফ-লস সিস্টেমঃ সমস্ত ট্রেডিং শৈলীর জন্য তিনটি মোড

স্থির পয়েন্ট মোড: স্বল্পদৈর্ঘ্য ব্যবসায়ীদের জন্য উপযুক্ত, ডিফল্ট স্টপ 10 পয়েন্ট, স্টপ 5 পয়েন্ট, ঝুঁকি-লাভের অনুপাত 2: 1। এই সেটিংটি বেশিরভাগ প্রধান মুদ্রা জোড়ায় স্থিতিশীল।

ATR গুণিতক মোড: গতিশীল সমন্বয় আরও বৈজ্ঞানিক, ডিফল্ট স্টপ স্টপ 2x এটিআর, স্টপ লস 1x এটিআর। 14 চক্রের এটিআর গণনা নিশ্চিত করে যে স্টপ লস স্তরটি বাজারের অস্থিরতার সাথে মেলে।

ঝুঁকি অনুপাত মডেল: সবচেয়ে পেশাদারী তহবিল ব্যবস্থাপনা পদ্ধতি, বাস্তব ঝুঁকি উপর ভিত্তি করে স্টপ অবস্থান গণনা, প্রতিটি লেনদেনের ঝুঁকি-লাভ অনুপাত পূর্বনির্ধারিত স্তরের নিশ্চিত।

ট্র্যাকিং স্টপ লসঃ 5 পয়েন্ট বিচ্যুতি + 3 পয়েন্ট সক্রিয় স্বর্ণের সমন্বয়

ট্র্যাকিং স্টপ চালু করার পরে, যখন ফ্ল্যাশটি 3 পয়েন্টে পৌঁছায় তখন এটি সক্রিয় হয়, এবং স্টপ লাইনটি সর্বোচ্চ 5 পয়েন্টের কাছাকাছি থাকে। এই প্যারামিটার সমন্বয়টি প্রচুর প্রতিক্রিয়ার পরে অনুকূলিত করা হয়েছেঃ 3 পয়েন্ট সক্রিয়করণ ক্ষুদ্র ওঠানামা থেকে বিরত থাকে এবং 5 পয়েন্ট বিচ্যুতি লাভের সুরক্ষা এবং তাড়াতাড়ি প্রস্থান এড়ানোর মধ্যে একটি ভারসাম্য খুঁজে পায়।

ভর্তির শর্ত কঠোর কিন্তু সঠিক: তিনটি প্রয়োজনীয়তা

আরো শর্তাবলী

  1. মুরগির ভক্ষণের দৃশ্য
  2. দাম এসএমএ 22 ((0.5 পয়েন্ট বাউন্স সহ) স্পর্শ করে এবং ক্লোজিং মূল্য এসএমএ 22 এর উপরে থাকে
  3. বর্তমান মূল্য SMA200 এর উপরে (ট্রেন্ড ফিল্টার)

শূন্যতা

  1. বিপর্যয়গ্রস্তদের মধ্যে বিপর্যয়
  2. মূল্য এসএমএ 22 ((0.5 পয়েন্ট বাউন্স সহ) স্পর্শ করে এবং এটি এসএমএ 22 এর নীচে বন্ধ হয়
  3. বর্তমান মূল্য SMA200 এর নিচে (ট্রেন্ড ফিল্টার)

রিয়েল-টাইম প্যারামিটার সুপারিশঃ বিভিন্ন বাজার পরিবেশে সর্বোত্তম কনফিগারেশন

প্রবণতা বাজারএসএমএ বাফার জোন 0.3 এবং ট্র্যাকিং স্টপ অ্যাক্টিভেশন পয়েন্ট 5।

বাজারের ধাক্কা: ট্র্যাকিং স্টপ বন্ধ করার সুপারিশ করা হয়, ফিক্সড স্টপস্টপ ব্যবহার করা হয়, এসএমএ বাফার জোন যথাযথভাবে 0.8 পর্যন্ত প্রশস্ত করা যেতে পারে।

বাজারের উচ্চ অস্থিরতাএটিআর গুণিতক মোডে সর্বোত্তম পারফরম্যান্স, স্টপস্টপ 2.5x এটিআর এবং স্টপ লস 1.5x এটিআর।

কৌশলগত সীমাবদ্ধতাঃ এই পরিস্থিতিতে ভাল কাজ করছে না

০২.১১১: এসএমএ ২২ এবং এসএমএ ২০০ খুব কাছাকাছি হলে, প্রবণতা ফিল্টারটি ব্যর্থ হয়, যা মিথ্যা সংকেত তৈরি করতে পারে।

তীব্র ওঠানামা: এই ফর্ম্যাটটি চরম পরিস্থিতিতে অকার্যকর হতে পারে, তাই এটি ব্যবহার বন্ধ করার পরামর্শ দেওয়া হচ্ছে।

নিম্ন তরলতার সময়মার্কেট খোলার আগে এবং পরে ব্যবহার করা এড়িয়ে চলুন।

ঝুঁকি ব্যবস্থাপনাঃ কঠোরভাবে বাস্তবায়ন করলে দীর্ঘমেয়াদে লাভ হবে

এই কৌশলটি ক্রমাগত ক্ষতির সম্ভাবনা রয়েছে, বিশেষত বাজার পরিবর্তনের সময়কালে। ইতিহাসের পুনর্বিবেচনা দেখায় যে সর্বাধিক ক্রমাগত ক্ষতির পরিমাণ 5-7 পয়েন্ট পর্যন্ত হতে পারে, সুতরাং একক ঝুঁকিটি অ্যাকাউন্টের তহবিলের 2% এর বেশি হওয়া উচিত নয়। কৌশলটির ঐতিহাসিক কর্মক্ষমতা ভবিষ্যতের আয়কে প্রতিনিধিত্ব করে না এবং বাজারের পরিবেশের পরিবর্তনগুলি কৌশলটির কার্যকারিতা প্রভাবিত করতে পারে।

তহবিল ব্যবস্থাপনার সাথে ব্যবহারের পরামর্শ দেওয়া হচ্ছেঃ ক্রমাগত 3 টি ক্ষতির পরে লেনদেন স্থগিত করুন, বাজার পরিস্থিতি পুনরায় মূল্যায়ন করুন। একই সময়ে, বিভিন্ন জাতের পারফরম্যান্সের মধ্যে বড় পার্থক্য রয়েছে, নির্দিষ্ট লেনদেনের জাতের জন্য প্যারামিটার অপ্টিমাইজেশন প্রয়োজন।

কৌশল সোর্স কোড
/*backtest
start: 2024-09-04 00:00:00
end: 2025-09-02 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT","balance":500000}]
*/

//@version=6
strategy("SHUBHAM V7a", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)

// Inputs
smaPeriod = input.int(22, title="SMA 22 Period", minval=1)
sma200Period = input.int(200, title="SMA 200 Period", minval=1)
smaBuffer = input.float(0.5, title="SMA Buffer", minval=0)
patternBuffer = input.float(0.0, title="Engulfing Pattern Buffer", minval=0)

// TP/SL Settings
tpMode = input.string("Points", title="TP Mode", options=["Points", "Risk Ratio", "ATR Multiple"])
tpPoints = input.float(10.0, title="Take Profit (Points)", minval=0.1)
tpRiskRatio = input.float(2.0, title="TP Risk Ratio (R:R)", minval=0.1)
tpAtrMultiple = input.float(2.0, title="TP ATR Multiple", minval=0.1)

slMode = input.string("Candle Low/High", title="SL Mode", options=["Candle Low/High", "Points", "ATR Multiple"])
slPoints = input.float(5.0, title="SL Points", minval=0.1)
slAtrMultiple = input.float(1.0, title="SL ATR Multiple", minval=0.1)
slBuffer = input.float(0.0, title="Extra SL Buffer", minval=0)

// ATR for TP/SL calculations
atrPeriod = input.int(14, title="ATR Period", minval=1)

// Trailing Stop Settings
enableTrailing = input.bool(true, title="Enable Trailing Stop")
trailOffset = input.float(5.0, title="Trailing Stop Offset (Points)", minval=0.1)
trailActivation = input.float(3.0, title="Trailing Activation (Points)", minval=0.1)

// Alert Settings
enableAlerts = input.bool(true, title="Enable Alerts")

// Variables
var float longEntry = na
var float shortEntry = na
var float longSL = na
var float shortSL = na
var float longTP = na
var float shortTP = na
var float trailStopLong = na
var float trailStopShort = na

// SMA Calculations
sma22 = ta.sma(close, smaPeriod)
sma200 = ta.sma(close, sma200Period)
atr = ta.atr(atrPeriod)

// Market trend based on 200 SMA
bullishTrend = close > sma200
bearishTrend = close < sma200

// Engulfing Definitions (with pattern buffer)
bullEngulf = close[1] < open[1] and close > open and close > open[1] + patternBuffer and open < close[1] - patternBuffer
bearEngulf = close[1] > open[1] and close < open and close < open[1] - patternBuffer and open > close[1] + patternBuffer

// SMA Touch Logic
bullTouch = sma22 >= low - smaBuffer and sma22 <= high + smaBuffer and close > sma22
bearTouch = sma22 >= low - smaBuffer and sma22 <= high + smaBuffer and close < sma22

// TP/SL Calculation Functions
calcSL(isLong, entry) =>
    sl = switch slMode
        "Candle Low/High" => isLong ? low - slBuffer : high + slBuffer
        "Points" => isLong ? entry - slPoints : entry + slPoints
        "ATR Multiple" => isLong ? entry - (atr * slAtrMultiple) : entry + (atr * slAtrMultiple)
        => na
    sl

calcTP(isLong, entry) =>
    tp = switch tpMode
        "Points" => isLong ? entry + tpPoints : entry - tpPoints
        "ATR Multiple" => isLong ? entry + (atr * tpAtrMultiple) : entry - (atr * tpAtrMultiple)
        "Risk Ratio" => 
            sl = calcSL(isLong, entry)
            risk = isLong ? entry - sl : sl - entry
            isLong ? entry + (risk * tpRiskRatio) : entry - (risk * tpRiskRatio)
        => na
    tp

// Final Conditions - Adding 200 SMA trend filter
bullCond = bullEngulf and bullTouch and bullishTrend
bearCond = bearEngulf and bearTouch and bearishTrend

// Determine position status using strategy.position_size
inLong = strategy.position_size > 0
inShort = strategy.position_size < 0
flat = strategy.position_size == 0

// Reset variables when flat
if flat
    longEntry := na
    shortEntry := na
    longSL := na
    shortSL := na
    longTP := na
    shortTP := na
    trailStopLong := na
    trailStopShort := na

// Entry Logic - Enhanced TP/SL calculation
if bullCond and flat
    longEntry := close
    longSL := calcSL(true, close)
    longTP := calcTP(true, close)
    trailStopLong := enableTrailing ? longSL : na
    
    strategy.entry("BUY", strategy.long)
    if enableTrailing
        strategy.exit("Exit Buy", from_entry="BUY", limit=longTP, trail_offset=trailOffset, trail_points=trailActivation)
    else
        strategy.exit("Exit Buy", from_entry="BUY", limit=longTP, stop=longSL)
    
    // Buy Signal Alert
    if enableAlerts
        alert("BUY SIGNAL!\nSymbol: " + syminfo.ticker + "\nPrice: " + str.tostring(close, "#.####") + "\nSMA22: " + str.tostring(sma22, "#.####") + "\nSMA200: " + str.tostring(sma200, "#.####") + "\nTP: " + str.tostring(longTP, "#.####") + "\nSL: " + str.tostring(longSL, "#.####") + "\nR:R = " + str.tostring((longTP - close) / (close - longSL), "#.##"), alert.freq_once_per_bar)

if bearCond and flat
    shortEntry := close
    shortSL := calcSL(false, close)
    shortTP := calcTP(false, close)
    trailStopShort := enableTrailing ? shortSL : na
    
    strategy.entry("SELL", strategy.short)
    if enableTrailing
        strategy.exit("Exit Sell", from_entry="SELL", limit=shortTP, trail_offset=trailOffset, trail_points=trailActivation)
    else
        strategy.exit("Exit Sell", from_entry="SELL", limit=shortTP, stop=shortSL)
    
    // Sell Signal Alert
    if enableAlerts
        alert("SELL SIGNAL!\nSymbol: " + syminfo.ticker + "\nPrice: " + str.tostring(close, "#.####") + "\nSMA22: " + str.tostring(sma22, "#.####") + "\nSMA200: " + str.tostring(sma200, "#.####") + "\nTP: " + str.tostring(shortTP, "#.####") + "\nSL: " + str.tostring(shortSL, "#.####") + "\nR:R = " + str.tostring((close - shortTP) / (shortSL - close), "#.##"), alert.freq_once_per_bar)

// Manual trailing stop calculation
if inLong and enableTrailing and not na(longEntry)
    profitPoints = high - longEntry
    if profitPoints >= trailActivation
        newTrailStop = high - trailOffset
        trailStopLong := na(trailStopLong) ? newTrailStop : math.max(trailStopLong, newTrailStop)

if inShort and enableTrailing and not na(shortEntry)
    profitPoints = shortEntry - low
    if profitPoints >= trailActivation
        newTrailStop = low + trailOffset
        trailStopShort := na(trailStopShort) ? newTrailStop : math.min(trailStopShort, newTrailStop)

// Plots with enhanced trend visualization
plot(sma22, color=color.orange, title="SMA 22", linewidth=2)
plot(sma200, color=bullishTrend ? color.lime : color.red, title="SMA 200", linewidth=3)

// Clear trend visualization
bgcolor(bullishTrend ? color.new(color.green, 92) : color.new(color.red, 92), title="Trend Background")
barcolor(bullCond ? color.lime : bearCond ? color.red : na)

// Trend direction indicators
plotshape(bullishTrend and not bullishTrend[1], title="Uptrend Start", style=shape.labelup, 
          location=location.belowbar, color=color.green, size=size.small, text="📈 UPTREND", textcolor=color.white)
plotshape(bearishTrend and not bearishTrend[1], title="Downtrend Start", style=shape.labeldown, 
          location=location.abovebar, color=color.red, size=size.small, text="📉 DOWNTREND", textcolor=color.white)

// SMA cross signals
sma22AboveSma200 = sma22 > sma200
plotshape(sma22AboveSma200 and not sma22AboveSma200[1], title="Golden Cross", style=shape.triangleup, 
          location=location.bottom, color=color.yellow, size=size.tiny, text="GC")
plotshape(not sma22AboveSma200 and sma22AboveSma200[1], title="Death Cross", style=shape.triangledown, 
          location=location.top, color=color.purple, size=size.tiny, text="DC")

// Entry Price Lines
plot(inLong ? longEntry : na, color=color.blue, style=plot.style_line, linewidth=1, title="Long Entry")
plot(inShort ? shortEntry : na, color=color.purple, style=plot.style_line, linewidth=1, title="Short Entry")

// Take Profit Lines
plot(inLong ? longTP : na, color=color.green, style=plot.style_line, linewidth=2, title="Long TP")
plot(inShort ? shortTP : na, color=color.green, style=plot.style_line, linewidth=2, title="Short TP")

// Stop Loss Lines (Fixed or Trailing)
plot(inLong and not enableTrailing ? longSL : na, color=color.red, style=plot.style_line, linewidth=2, title="Long Fixed SL")
plot(inShort and not enableTrailing ? shortSL : na, color=color.red, style=plot.style_line, linewidth=2, title="Short Fixed SL")

// Trailing Stop Lines
plot(inLong and enableTrailing ? trailStopLong : na, color=color.orange, style=plot.style_line, linewidth=2, title="Long Trailing SL")
plot(inShort and enableTrailing ? trailStopShort : na, color=color.orange, style=plot.style_line, linewidth=2, title="Short Trailing SL")

// Buy/Sell Signal Arrows with enhanced visibility
plotshape(bullCond, title="Buy Signal", style=shape.triangleup, location=location.belowbar, 
          color=color.new(color.green, 0), size=size.large)
plotshape(bearCond, title="Sell Signal", style=shape.triangledown, location=location.abovebar, 
          color=color.new(color.red, 0), size=size.large)

// Buy/Sell Labels with R:R info
plotshape(bullCond, title="Buy Label", style=shape.labelup, location=location.belowbar, 
          color=color.new(color.green, 0), size=size.normal, text="🚀 BUY", textcolor=color.white)
plotshape(bearCond, title="Sell Label", style=shape.labeldown, location=location.abovebar, 
          color=color.new(color.red, 0), size=size.normal, text="🔻 SELL", textcolor=color.white)