গতির প্রবণতা ট্র্যাকিং কৌশল

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

img

সারসংক্ষেপ

এই কৌশলটি চলমান গড় এবং ভলিউমের প্রবণতা বিশ্লেষণের উপর ভিত্তি করে, গতির সূচক নির্ধারণ করে এবং প্রবণতা অনুসরণ করে ক্রয় এবং বিক্রয় অপারেশন করে।

কৌশলগত নীতি

  1. বন্ধ মূল্যের EMA এবং ভলিউমের সমষ্টিগত EMA গণনা করুন
  2. যখন বন্ধ EMA এর উপরে অতিক্রম করে, তখন এটি একটি আপ ট্রেন্ড হিসাবে বিচার করা হয় এবং দীর্ঘ অবস্থান নেওয়া হয়
  3. যখন চলতে থাকে, বন্ধ ক্রসগুলি সমষ্টিগত EMA এর 2 গুণের উপরে, লং পজিশনে যোগ করুন
  4. RSI সূচক সেট করুন, যখন RSI 90 অতিক্রম করে, মুনাফা গ্রহণের জন্য 1/3 অবস্থান বন্ধ করুন
  5. যখন বন্ধ EMA এর নীচে ক্রস হয়, এটি নিম্নমুখী প্রবণতা হিসাবে বিচার করা হয়, সমস্ত দীর্ঘ পজিশন বন্ধ করুন
  6. যখন বন্ধ EMA এর নীচে ক্রস হয়, এটি নেমে যাওয়ার প্রবণতা হিসাবে বিচার করা হয়, শর্ট পজিশন নিন
  7. এন্ট্রি প্রাইসের স্থির শতাংশে স্টপ লস লাইন সেট করুন
  8. শর্ট পজিশনের মুনাফা নেওয়া লং পজিশনের সমান

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

এই কৌশলটির প্রধান সুবিধাগুলো হল:

  1. প্রবণতা মূল্যায়নের জন্য ইএমএ ব্যবহার করে প্রবণতা কার্যকরভাবে ট্র্যাক করতে পারে
  2. প্রকৃত প্রবণতা পরিবর্তনগুলি বিচার করার জন্য ভলিউমের সমষ্টিগত ইএমএ ব্যবহার করা
  3. মুনাফা গ্রহণের জন্য ট্র্যাকিং গতির সূচক RSI
  4. স্টপ লস সহ ভাল ঝুঁকি নিয়ন্ত্রণ
  5. বিভিন্ন বাজারের অবস্থার সাথে মানিয়ে নিতে পারে, পরামিতিগুলি নমনীয়ভাবে সামঞ্জস্য করা যেতে পারে

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

এই কৌশলটির প্রধান ঝুঁকিগুলি হলঃ

  1. ইএমএ পিছিয়ে আছে, পরিবর্তনের পয়েন্ট মিস করতে পারে
  2. ভলিউম সবসময় বাস্তব প্রবণতা প্রতিফলিত করতে পারে না
  3. স্থির শতাংশ স্টপ লস খুব যান্ত্রিক হতে পারে
  4. অনেক প্যারামিটার প্যারামিটার টিউনিং কঠিন করে তোলে
  5. উচ্চ ট্রেডিং ফ্রিকোয়েন্সি উচ্চ ট্রেডিং খরচ হতে পারে

ঝুঁকি সমাধানঃ

  1. বিলম্ব হ্রাস করার জন্য EMA পরামিতিগুলি অপ্টিমাইজ করুন
  2. ভলিউম সংকেত নিশ্চিত করার জন্য অন্যান্য সূচকগুলির সাথে একত্রিত করুন
  3. বাজারের অবস্থার উপর ভিত্তি করে স্টপ লস পয়েন্টগুলি অপ্টিমাইজ করুন
  4. প্যারামিটার সরলীকরণ, শুধুমাত্র প্রধান সেটিংস রাখা
  5. স্টপ লস এবং ট্রেডিং ফ্রিকোয়েন্সি যথাযথভাবে শিথিল করুন

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

এই কৌশলটি নিম্নলিখিত দিকগুলিতে অনুকূলিত করা যেতে পারেঃ

  1. সর্বোত্তম সমন্বয় খুঁজে পেতে বিভিন্ন EMA পরামিতি সেটিংস পরীক্ষা করুন
  2. ভলিউম মাল্টিপল যোগ করুন প্রবেশের জন্য সংকেত শক্তি বিচার হিসাবে
  3. প্রবেশ নিশ্চিত করতে MACD, KD এবং অন্যান্য সূচকগুলির সাথে সংযুক্ত করুন
  4. নির্দিষ্ট স্টকগুলির বৈশিষ্ট্য অনুসারে স্টপ লস শতাংশ অনুকূলিত করুন
  5. ট্রেডিং খরচ কমানোর জন্য ট্রেডিং ফ্রিকোয়েন্সি অপ্টিমাইজ করুন

সংক্ষিপ্তসার

সংক্ষেপে, এটি চলমান গড় সিস্টেমের উপর ভিত্তি করে একটি প্রবণতা ট্র্যাকিং কৌশল। মূল ধারণাটি হ'ল প্রবণতার দিক নির্ধারণের জন্য ইএমএ ব্যবহার করা এবং ভলিউম গতির সূচক দিয়ে প্রবেশ নিশ্চিত করা। এটি পরামিতি টিউনিংয়ের মাধ্যমে অবিচ্ছিন্নভাবে অনুকূলিত করা যেতে পারে এবং আরও নিশ্চিতকরণের জন্য অন্যান্য সূচকগুলির সহায়তায় সহায়তা করা যেতে পারে। সামগ্রিকভাবে এটি একটি নমনীয় প্রবণতা ট্র্যাকিং কৌশল, যা দক্ষ ব্যবহারের পরে ভাল রিটার্ন দিতে পারে।


/*backtest
start: 2023-10-30 00:00:00
end: 2023-11-06 00:00:00
period: 5m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © mohanee

//@version=4
strategy("EMA_cumulativeVolume_crossover[Strategy]", overlay=true, pyramiding=5, default_qty_type=strategy.percent_of_equity,  default_qty_value=20, initial_capital=10000)


emaLength= input(25, title="EMA Length", minval=1, maxval=200)
cumulativePeriod = input(100,  title="cumulative volume Period", minval=1, maxval=200)


riskCapital = input(title="Risk % of capital", defval=10, minval=1)
stopLoss=input(8,title="Stop Loss",minval=1)
takePartialProfits=input(true, title="take partial profits  (percentage same as stop loss)")

tradeDirection=input(title="Trade Direction", defval="LONG", options=["LONG", "SHORT"])

avgPrice = (high + low + close) / 3
avgPriceVolume = avgPrice * volume

cumulPriceVolume = sum(avgPriceVolume, cumulativePeriod)
cumulVolume = sum(volume, cumulativePeriod)

cumValue = cumulPriceVolume / cumulVolume

emaVal=ema(close, emaLength)

emaCumValue1=ema(cumValue, emaLength)
emaCumValue2=ema(cumValue, emaLength*2)

emaCumValueHistory=ema(cumValue[emaLength], emaLength)


//vwapVal1=vwap(hlc3)

rsiVal=rsi(close,5)

plotEma=plot(emaVal, title="EMA", color=color.green,  transp=25)
//plot(vwapValue, title="Cumulate Volumne", color=color.orange,  linewidth=2, transp=25)
//plot(vwapVal1, title="vwapVal1", color=color.purple,  linewidth=1, transp=25)
plotCum=plot(emaCumValue1, title="emaVwapValue", color=color.purple,  linewidth=2, transp=35)
plot(emaCumValue2, title="emaVwapValue", color=color.yellow,  linewidth=3, transp=25)
fill(plotEma,plotCum, color=emaVal>emaCumValue1 ? color.lime : color.red, transp=35, title="ema and cum area")

plot(emaCumValueHistory, title="emaCumValueHistory", color=color.black,  linewidth=2, transp=25)



//bgcolor(emaVal>vwapValue?color.blue:color.purple)    

//Entry--
//Echeck how many units can be purchased based on risk manage ment and stop loss
qty1 = (strategy.equity  * riskCapital / 100 ) /  (close*stopLoss/100)  

//check if cash is sufficient  to buy qty1  , if capital not available use the available capital only
qty1:= (qty1 * close >= strategy.equity ) ? (strategy.equity / close) : qty1

//strategy.entry(id="LE",comment="LE", long=true, qty=qty1, when=crossover(emaVal, vwapValue)  and (tradeDirection=="LONG") )    //emaVal>vwapValue and crossover(close , emaVal)

strategy.entry(id="LE",comment="LE", long=true, qty=qty1, when=strategy.position_size==0 and crossover(emaVal, emaCumValue1)  and (tradeDirection=="LONG") )    //emaVal>vwapValue and crossover(close , emaVal)

//re-entry
rentryCondition1=strategy.position_size>1 and emaVal > emaCumValue1 and emaCumValue1>emaCumValue2 and crossover(close, emaCumValue2) and close>open and  (tradeDirection=="LONG")
strategy.entry(id="LE",comment="LE RE", long=true, qty=qty1, when=rentryCondition1 )

rentryCondition2=strategy.position_size>1 and emaVal > emaCumValue1 and emaCumValue1>emaCumValueHistory and crossover(close, emaCumValueHistory) and close>open and  (tradeDirection=="LONG")
//strategy.entry(id="LE",comment="LE RE", long=true, qty=qty1, when=rentryCondition2 )    


//stoploss
stopLossVal=  strategy.position_size>=1 ?  (strategy.position_avg_price * (1-(stopLoss*0.01) )) : 0.00

//draw initil stop loss
//plot(strategy.position_size>=1 ? stopLossVal : na, color = color.purple , style=plot.style_linebr,  linewidth = 2, title = "stop loss")

//partial exits
takeProfit=  strategy.position_size>=1 ?  (strategy.position_avg_price * (1+(1*0.01) )) : ( close[1] * 2 )
//if(takePartialProfits==true)
    //strategy.close(id="LE", comment="Partial"+tostring(close-strategy.position_avg_price, "###.##") , qty=strategy.position_size/3 , when = (tradeDirection=="LONG" ) and close>takeProfit and crossunder(close, emaVal) )    //close<close[1] and close[1]<close[2] and close[2]<close[3])

strategy.close(id="LE", comment="PExit Points=>"+tostring(close-strategy.position_avg_price, "###.##") , qty=strategy.position_size/3 , when = (tradeDirection=="LONG" ) and  takePartialProfits == true and close>=takeProfit and crossunder(rsiVal,90) )

profitVal=    strategy.position_size>=1 ?  (strategy.position_avg_price * (1+(1*0.01) )) : ( close[1] * 2 )

//strategy.close(id="LE" , comment="LE Exit Points="+tostring(close-strategy.position_avg_price, "###.##"), when=crossunder(emaVal, vwapValue) and (tradeDirection=="LONG") )

strategy.close(id="LE" , comment="Exit Points=>"+tostring(close-strategy.position_avg_price, "###.##"), when=  crossunder(emaVal, emaCumValue1) and (tradeDirection=="LONG") )


strategy.close(id="LE" , comment="SL Exit Loss="+tostring(close-strategy.position_avg_price, "###.##"), when= close < stopLossVal   and (tradeDirection=="LONG") )


//for short  you dont have to wait crossodown of ema, falling is speed , so just check if close crossing down vwapVal
strategy.entry(id="SE",comment="SE", long=false, qty=qty1, when=crossunder(emaVal, emaCumValue1) and (tradeDirection=="SHORT") )    //emaVal>vwapValue and crossover(close , emaVal)


//stoploss
stopLossValUpside=  abs(strategy.position_size)>=1 and tradeDirection=="SHORT" ?  (strategy.position_avg_price * (1+(stopLoss*0.01) )) : 0.00

//draw initil stop loss
//plot(abs(strategy.position_size)>=1 and tradeDirection=="SHORT" ? stopLossValUpside : na, color = color.purple , style=plot.style_linebr,  linewidth = 2, title = "stop loss")

//partial exits
shortTakeProfit=  abs(strategy.position_size)>=1 and tradeDirection=="SHORT" ?  (strategy.position_avg_price * (1-(stopLoss*0.01) )) : 0.00
if(takePartialProfits==true)
    strategy.close(id="SE", comment="Partial" , qty=strategy.position_size/3 , when = (tradeDirection=="SHORT"   ) and  crossover(rsiVal,15) )  //close<takeProfit and (emaVal - close)>8 )
  
//strategy.close(id="SE" , comment="SE Exit Points="+tostring(close-strategy.position_avg_price, "###.##"), when=crossover(emaVal, vwapValue) and (tradeDirection=="SHORT") )
//strategy.close(id="SE" , comment="SE Exit Points="+tostring(close-strategy.position_avg_price, "###.##"), when= abs(strategy.position_size)>=1 and ( (emaVal<emaCumValue1 and close>emaCumValue1 and open>emaCumValue1 and close>open )   or (crossover(emaVal,emaCumValue1))  ) and (tradeDirection=="SHORT") )

//strategy.close(id="SE" , comment="SL Exit Loss="+tostring(close-strategy.position_avg_price, "###.##"), when= abs(strategy.position_size)>=1 and  close > stopLossValUpside   and (tradeDirection=="SHORT"   ) )
strategy.close(id="SE" , comment="SL Exit Loss="+tostring(close-strategy.position_avg_price, "###.##"), when= abs(strategy.position_size)>=1 and  crossover(emaVal, emaCumValue1)   and (tradeDirection=="SHORT"   ) )



আরো