সহজ ট্রেন্ড অনুসরণ কৌশল


সৃষ্টির তারিখ: 2023-09-14 18:01:07 অবশেষে সংশোধন করুন: 2023-09-14 18:01:07
অনুলিপি: 0 ক্লিকের সংখ্যা: 645
1
ফোকাস
1617
অনুসারী

কৌশল নীতি

এই কৌশলটি সমান্তরাল সূচক এবং হল কার্ভ সূচককে একত্রিত করে বাজার প্রবণতার দিকনির্দেশনা সনাক্ত করতে এবং প্রবণতা অনুসরণ করতে পারে।

মূল লেনদেনের লজিক হলঃ

  1. ম্যাককিনি ডায়নামিক গড়ের হিসাব করে বাজারের সামগ্রিক প্রবণতার দিক নির্ণয় করা হয়

  2. হোল কার্ভের নির্দেশকটি অতিক্রম করে একটি নির্দিষ্ট অতিরিক্ত খালি সংকেত প্রেরণ করে

  3. সিগন্যাল যাচাইকরণের জন্য বিকল্প সহায়ক সূচক

  4. স্টপ লস এবং স্টপ স্টপ নীতির উপর ভিত্তি করে ঝুঁকি ব্যবস্থাপনা ব্যবস্থা স্থাপন করা

  5. হোলের বক্ররেখা বিপরীত সময় সমান্তরাল ক্ষতি বন্ধ

এই কৌশলটি ট্রেন্ড ট্র্যাকিং প্রক্রিয়াকে সরল করে তোলে, যার উদ্দেশ্য হল বাজারের গতির সাথে মেলে যাওয়া যান্ত্রিক সিস্টেম তৈরি করা এবং ব্যক্তিগত চিন্তাভাবনার প্রভাব হ্রাস করা।

কৌশলগত সুবিধা

  • গড় লাইন সামগ্রিক দিকনির্দেশনা নির্ধারণ করে, সহায়ক সূচকগুলি নির্বাচনযোগ্য

  • হোল কার্ভ একটি সুনির্দিষ্ট অতিরিক্ত ফাঁকা সংকেত উৎপন্ন করে

  • ঝুঁকি ব্যবস্থাপনার নিয়মকানুন, ত্রুটি কমানো

কৌশলগত ঝুঁকি

  • পরামিতি সেটিং এবং ফিল্টারিং শর্তাবলী পরীক্ষার অপ্টিমাইজেশান প্রয়োজন

  • প্রবণতা নির্ণয়ের সঠিকতা নিয়ে অনিশ্চয়তা রয়েছে

  • হোলের বক্ররেখার ত্রুটিপূর্ণ সংকেত হতে পারে

সারসংক্ষেপ

এই কৌশলটি যান্ত্রিকীকরণের প্রবণতার সাথে সামঞ্জস্যপূর্ণ এবং অপারেশন প্রক্রিয়াটি সহজতর করার লক্ষ্যে। তবে স্থিতিশীলতা বাড়ানোর জন্য প্যারামিটার অপ্টিমাইজেশন এবং সূচক সীমাবদ্ধতার বিষয়ে এখনও মনোযোগ দেওয়া দরকার।

কৌশল সোর্স কোড
/*backtest
start: 2023-08-14 00:00:00
end: 2023-09-13 00:00:00
period: 4h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// © Milleman
//@version=4
strategy("Millebot", overlay=true, default_qty_type = strategy.percent_of_equity, default_qty_value = 100, initial_capital=100000, commission_type=strategy.commission.percent, commission_value=0.04)

// Risk management settings
Spacer2 = input(false, title="=== Risk management settings ===")
Risk = input(1.0, title="% Risk")/100
RRR = input(2,title="Risk Reward Ratio",step=0.1,minval=0,maxval=20)
SL = input(5,title="StopLoss %",step=0.25)/100

// Baseline : McGinley Dynamic
Spacer3 = input(false, title="=== Baseline - Switch L/S ===")
McG_Source = input(close, title="McGinley source")
McG_length = input(50, title=" McG length", minval=1)
McG_LS_Switch = 0.0
McG_LS_Switch := na(McG_LS_Switch[1]) ? ema(McG_Source, McG_length) : McG_LS_Switch[1] + (McG_Source - McG_LS_Switch[1]) / (McG_length * pow(McG_Source/McG_LS_Switch[1], 4))

// Confirmation indicator
Spacer4 = input(false, title="=== Confirmation indicator ===")
C1_Act = input(false, title=" Confirmation indicator Activation")
C1_src = input(ohlc4, title="Source")
C1_len = input(5,title="Length")
C1 = sma(C1_src,C1_len)

// Entry indicator : Hull Moving Average
Spacer5 = input(false, title="=== Entry indicator configuration ===")
src = input(ohlc4, title="Source")
length = input(50,title="Length HMA")
HMA = ema(wma(2*wma(src, length/2)-wma(src, length), round(sqrt(length))),1)

//VARIABLES MANAGEMENT
TriggerPrice = 0.0, TriggerPrice := TriggerPrice[1]
TriggerxATR = 0.0, TriggerxATR := TriggerxATR[1]
SLPrice = 0.0, SLPrice := SLPrice[1], TPPrice = 0.0, TPPrice := TPPrice[1]
isLong = false, isLong := isLong[1], isShort = false, isShort := isShort[1]

//LOGIC
GoLong = crossover(HMA[0],HMA[1]) and strategy.position_size == 0.0 and (McG_LS_Switch/McG_LS_Switch[1] > 1) and (not C1_Act or C1>C1[1])
GoShort = crossunder(HMA[0],HMA[1]) and strategy.position_size == 0.0 and (McG_LS_Switch/McG_LS_Switch[1] < 1) and (not C1_Act or C1<C1[1])

//FRAMEWORK

//Long
if GoLong and not GoLong[1]
    isLong := true, TriggerPrice := close
    TPPrice := TriggerPrice * (1 + (SL * RRR))
    SLPrice := TriggerPrice * (1-SL)
    Entry_Contracts = strategy.equity * Risk / ((TriggerPrice-SLPrice)/TriggerPrice) / TriggerPrice //Het aantal contracts moet meegegeven worden. => budget * risk / %afstand tot SL / prijs = aantal contracts
    strategy.entry("Long", strategy.long, comment=tostring(round(TriggerxATR/TriggerPrice*1000)), qty=Entry_Contracts)
    strategy.exit("TPSL","Long", limit=TPPrice, stop=SLPrice, qty_percent = 100)
if isLong and crossunder(HMA[0],HMA[1])
    strategy.close_all(comment="TrendChange")
    isLong := false

//Short
if GoShort and not GoShort[1]
    isShort := true, TriggerPrice := close
    TPPrice := TriggerPrice * (1 - (SL * RRR))
    SLPrice := TriggerPrice * (1 + SL)
    Entry_Contracts = strategy.equity * Risk / ((SLPrice-TriggerPrice)/TriggerPrice) / TriggerPrice //Het aantal contracts moet meegegeven worden. => budget * risk / %afstand tot SL / prijs = aantal contracts
    strategy.entry("Short", strategy.short, comment=tostring(round(TriggerxATR/TriggerPrice*1000)), qty=Entry_Contracts)
    strategy.exit("TPSL","Short", limit=TPPrice, stop=SLPrice)//, qty_percent = 100)
if isShort and crossover(HMA[0],HMA[1])
    strategy.close_all(comment="TrendChange")
    isShort := false

//VISUALISATION
plot(McG_LS_Switch,color=color.blue,title="Baseline")
plot(C1_Act?C1:na,color=color.white,title="confirmation Indicator")
plot(HMA, color=(HMA[0]>HMA[1]? color.green : color.red), linewidth=4, transp=40, title="Entry Indicator")
plot(isLong or isShort ? TPPrice : na, title="TakeProfit", color=color.green, style=plot.style_linebr)
plot(isLong or isShort ? SLPrice : na, title="StopLoss", color=color.red, style=plot.style_linebr)
bgcolor(isLong[1] and cross(low,SLPrice) and low[1] > SLPrice ? color.yellow : na, transp=75, title="SL Long")
bgcolor(isShort[1] and cross(high,SLPrice) and high[1] < SLPrice ? color.yellow : na, transp=75, title="SL Short")