EMA এবং দীর্ঘ স্বল্পের জন্য ক্রমবর্ধমান ভলিউম ক্রসওভার কৌশল

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

সারসংক্ষেপ

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

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

50 দিনের ইএমএ এবং 100 দিনের সমষ্টিগত ভলিউম সূচকগুলি গণনা করা হয়। যখন ইএমএ নীচে থেকে সমষ্টিগত ভলিউমের উপরে অতিক্রম করে, তখন লম্বা হওয়ার জন্য একটি ক্রয় সংকেত উত্পন্ন হয়। যখন ইএমএ উপরে থেকে সমষ্টিগত ভলিউমের নীচে অতিক্রম করে, তখন একটি বিক্রয় সংকেত শর্ট হওয়ার জন্য উত্পন্ন হয়।

পজিশন চলাকালীন, স্থির স্টপ লস এবং লাভের কৌশলগুলি বাস্তবায়ন করা হয়। স্টপ লস প্রবেশ মূল্যের নিচে 8% এ সেট করা হয়। লাভের দাম প্রবেশ মূল্যের উপরে 8% এ সেট করা হয়, যখন দাম লাভের স্তরে পৌঁছে যায় তখন আংশিক অবস্থান বন্ধ হয়।

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

কৌশলটি প্রবণতা সূচক ইএমএ এবং তহবিল প্রবাহ সূচক সমষ্টিগত ভলিউমকে একত্রিত করে, মাঝারি ও দীর্ঘমেয়াদী প্রবণতা কার্যকরভাবে সনাক্ত করার জন্য মূল্য এবং ভলিউম উভয় তথ্যকে কাজে লাগায়। স্থির মুনাফা গ্রহণ এবং স্টপ লস দক্ষ এবং ঝুঁকি নিয়ন্ত্রণের সময় আংশিক মুনাফা লক করতে সহায়তা করে।

EMA সময়কাল বিভিন্ন পণ্যের জন্য অবাধে সামঞ্জস্য করা যেতে পারে। উভয় দীর্ঘ এবং সংক্ষিপ্ত ট্রেড রৈখিক ট্রেডিং জন্য বাস্তবায়িত হয়। ব্যাকটেস্ট ট্রেন্ডিং সময়কালে ভাল কর্মক্ষমতা দেখায়।

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

চলমান গড়ের উপর অত্যধিক নির্ভরতা পরিসীমা সীমাবদ্ধ একীকরণের সময় whipsaws হতে পারে। স্থায়ী মুনাফা গ্রহণ এবং স্টপ লস এছাড়াও অকাল প্রস্থান বা oversized স্টপ আউট হতে পারে। শুধুমাত্র মূল্য এবং ভলিউম ফ্যাক্টর অন্যান্য উপাদান ছাড়া বিবেচনা করা হয়।

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

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

  1. সর্বোত্তম সেটিংস খুঁজে পেতে EMA পরামিতি সমন্বয় পরীক্ষা এবং অপ্টিমাইজ করুন।

  2. অন্যান্য প্রযুক্তিগত সূচককে একত্রিত করে একটি সমন্বয় ব্যবস্থা তৈরি করা।

  3. প্রবণতা পূর্বাভাস এবং EMA কর্মক্ষমতা উন্নত করতে মেশিন লার্নিং প্রয়োগ করুন।

  4. ট্রেল স্টপ, ডায়নামিক এক্সটেনশন ইত্যাদির সংমিশ্রণ করে লাভ গ্রহণ এবং স্টপ লস কৌশলগুলি অনুকূল করুন।

  5. গতিশীল পজিশনের আকার নির্ধারণের জন্য মূলধন ব্যবস্থাপনা মডিউল চালু করা।

  6. কৌশল সমষ্টি গঠনের জন্য পণ্যের বৈশিষ্ট্যগুলির উপর ভিত্তি করে পরামিতিগুলি কাস্টমাইজ করুন।

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

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


/*backtest
start: 2023-08-20 00:00:00
end: 2023-09-19 00:00:00
period: 2h
basePeriod: 15m
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=1, default_qty_type=strategy.percent_of_equity,  default_qty_value=20, initial_capital=10000)


emaLength= input(50, 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(false, 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)

vwapValue = cumulPriceVolume / cumulVolume

emaVal=ema(close, emaLength)

plot(emaVal, title="EMA", color=color.green,  transp=25)
plot(vwapValue, title="Cumulate Volumne / VWAP", color=color.orange,  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)

//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+(stopLoss*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="LE Exit Points="+tostring(close-strategy.position_avg_price, "###.##"), when=crossunder(emaVal, vwapValue) 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=(close<vwapValue and close<open  and close[1] < vwapValue  and close[1]<open[1] and close<close[1])  and emaVal>=vwapValue 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  close<shortTakeProfit )  //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<vwapValue and close>vwapValue and open>vwapValue and close>open )   or (crossover(emaVal,vwapValue))  ) 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"   ) )




আরো