EMA এবং MACD ভিত্তিক BTC ট্রেডিং কৌশল

লেখক:চাওঝাং, তারিখঃ ২০২৪-০১-২৫ ১২ঃ৫৪ঃ১৬
ট্যাগঃ

img

সারসংক্ষেপ

কৌশলগত যুক্তি

এটি ক্রয় সংকেত উৎপন্ন করে যখন পার্থক্য নেতিবাচক হয় এবং একটি প্রান্তিকের নিচে থাকে এবং এমএসিডিতে একটি হ্রাসকারী ক্রসওভার থাকে। এটি বিক্রয় সংকেত উৎপন্ন করে যখন পার্থক্য ইতিবাচক হয় এবং একটি প্রান্তিকের উপরে থাকে এবং এমএসিডিতে একটি উত্থান ক্রসওভার থাকে।

ইএমএ ডিফারেন্স এবং এমএসিডি উভয় থেকে সংকেত একত্রিত করে, কিছু ভুয়া সংকেত ফিল্টার করা যায় এবং সংকেতগুলির নির্ভরযোগ্যতা উন্নত করা যায়।

সুবিধা বিশ্লেষণ

  1. কম্পোজিট ইন্ডিকেটর ব্যবহার করে, আরো নির্ভরযোগ্য সংকেত
  2. স্বল্পমেয়াদী ব্যবসায়ের জন্য উপযুক্ত স্বল্পমেয়াদী পরামিতি গ্রহণ করে
  3. ঝুঁকি নিয়ন্ত্রণের জন্য স্টপ লস এবং লাভের সেটিং আছে

ঝুঁকি বিশ্লেষণ

  1. বিভিন্ন বাজারের পরিবেশের জন্য পরামিতিগুলি অপ্টিমাইজ করা দরকার
  2. বিভিন্ন মুদ্রা এবং বিনিময় উপর প্রভাব পরীক্ষা করা প্রয়োজন

অপ্টিমাইজেশান নির্দেশাবলী

  1. বিটিসির অস্থিরতার সাথে খাপ খাইয়ে নেওয়ার জন্য ইএমএ এবং এমএসিডি পরামিতিগুলি অনুকূলিত করুন
  2. মূলধন দক্ষতা বাড়াতে পজিশন সাইজিং এবং পিরামিডিং কৌশল যুক্ত করুন
  3. ঝুঁকি কমাতে স্টপ লস পদ্ধতি যোগ করুন যেমন ট্রেলিং স্টপ লস
  4. বিভিন্ন এক্সচেঞ্জ এবং মুদ্রায় পরীক্ষার প্রভাব

সিদ্ধান্ত


/*backtest
start: 2024-01-01 00:00:00
end: 2024-01-24 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=3
strategy("EMA50Diff & MACD Strategy", overlay=false)
EMA = input(18, step=1)
MACDfast = input(12)
MACDslow = input(26)
EMADiffThreshold = input(8)
MACDThreshold = input(80)
TargetValidityThreshold = input(65, step=5)
Target = input(120, step=5)
StopLoss = input(650, step=5) 
ema = ema(close, EMA)
hl = plot(0, color=white, linewidth=1)
diff = close - ema
clr = color(blue, transp=100)
if diff>0
    clr := lime
else 
    if diff<0
        clr := red

fastMA = ema(close, MACDfast)
slowMA = ema(close, MACDslow)
macd = (fastMA - slowMA)*3
signal = sma(macd, 9)
plot(macd, color=aqua, linewidth=2)
plot(signal, color=purple, linewidth=2)

macdlong = macd<-MACDThreshold and signal<-MACDThreshold and crossover(macd, signal)
macdshort = macd>MACDThreshold and signal>MACDThreshold and crossunder(macd, signal)
position = 0.0
position := nz(strategy.position_size, 0.0)
long = (position < 0 and close < strategy.position_avg_price - TargetValidityThreshold and macdlong) or 
     (position == 0.0 and diff < -EMADiffThreshold and diff > diff[1] and diff[1] < diff[2] and macdlong)

short = (position > 0 and close > strategy.position_avg_price + TargetValidityThreshold and macdshort) or 
      (position == 0.0 and diff > EMADiffThreshold and diff < diff[1] and diff[1] > diff[2] and macdshort)
amount = (strategy.equity / close) //- ((strategy.equity / close / 10)%10)
bgclr = color(blue, transp=100) //#0c0c0c
if long
    strategy.entry("long", strategy.long, amount)
    bgclr := green
if short
    strategy.entry("short", strategy.short, amount)
    bgclr := maroon
bgcolor(bgclr, transp=20)
strategy.close("long", when=close>strategy.position_avg_price + Target)
strategy.close("short", when=close<strategy.position_avg_price - Target)
strategy.exit("STOPLOSS", "long", stop=strategy.position_avg_price - StopLoss)
strategy.exit("STOPLOSS", "short", stop=strategy.position_avg_price + StopLoss)
//plotshape(long, style=shape.labelup, location=location.bottom, color=green)
//plotshape(short, style=shape.labeldown, location=location.top, color=red)
pl = plot(diff, style=histogram, color=clr)
fill(hl, pl, color=clr)


আরো