ডায়নামিক স্টপ লস অ্যালার্ট ট্রেডিংভিউ কৌশল

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

সারসংক্ষেপ

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

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

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

সুবিধা

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

ঝুঁকি

  • স্টোকাস্টিক সূচকে বিলম্ব বিদ্যমান
  • ঘন ঘন আংশিক মুনাফা গ্রহণে ব্যাঘাত ঘটায়
  • গতিশীল ভেরিয়েবলগুলি বিভিন্ন সময়সীমার মধ্যে ভিন্ন আচরণ করে
  • আংশিক মুনাফা শতাংশ অপ্টিমাইজেশান প্রয়োজন

স্টোকাস্টিক পরামিতিগুলি সামঞ্জস্য করে, আংশিক মুনাফা অনুপাত ইত্যাদি সামঞ্জস্য করে ঝুঁকিগুলি পরিচালনা করা যায়।

উন্নতি

  • বিভিন্ন স্টোকাস্টিক পরামিতি সমন্বয় পরীক্ষা করুন
  • আংশিক মুনাফা গ্রহণের অনুপাতকে অনুকূল করুন
  • অন্যান্য স্টপ লস পদ্ধতি যেমন ট্রেলিং স্টপ অনুসন্ধান করুন
  • বিভিন্ন বাজার ও পণ্যের উপর নির্ভরশীলতা পরীক্ষা করুন

সিদ্ধান্ত

এই কৌশলটি নতুন বৈশিষ্ট্য ব্যবহার করে ট্রেডিংভিউ থেকে এমটি 4/5 এ গতিশীল স্টপ লস ট্রেডগুলি সম্পাদন করে। এটি আরও ব্যাকটেস্টিংয়ের জন্য একটি কাঠামো হিসাবে কাজ করতে পারে। নির্দিষ্ট সম্পদের জন্য অপ্টিমাইজেশান প্রয়োজন।


/*backtest
start: 2023-08-18 00:00:00
end: 2023-09-17 00:00:00
period: 3h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/

//@version=4
// strategy(title="TradingView Alerts to MT4 MT5 Strategy example", commission_type=strategy.commission.cash_per_order, commission_value=0.00003, overlay=false, default_qty_value=100000, initial_capital=1000)
// study(title="TradingView Alerts to MT4 MT5 Strategy example")  //uncomment this line and comment previous one to make it a study producing alerts
//
// This script was created for educational purposes only.
// It is showing how to use dynamic variables in TradingView alerts.
// And how to execute them in Forex, indices and commodities markets
// thanks to www.tradingconnector.com

TakeProfitLevel=input(400)
TakePartialProfitLevel=input(150)

// **** Entries logic **** {
periodK = input(14, title="K", minval=1)
periodD = input(3, title="D", minval=1)
smoothK = input(4, title="Smooth", minval=1)
k = sma(stoch(close, high, low, periodK), smoothK)
d = sma(k, periodD)
plot(k, title="%K", color=color.blue)
plot(d, title="%D", color=color.orange)
h0 = hline(80)
h1 = hline(20)
fill(h0, h1, color=color.purple, transp=75)

GoLong=crossover(k,d)// and k<80
GoShort=crossunder(k,d)// and k>20
// } End of entries logic

// **** Pivot-points and stop-loss logic **** {
piv_high = pivothigh(high,1,1)
piv_low = pivotlow(low,1,1)
var float stoploss_long=low
var float stoploss_short=high

pl=valuewhen(piv_low,piv_low,0)
ph=valuewhen(piv_high,piv_high,0)

if GoLong 
    stoploss_long := low<pl ? low : pl
if GoShort 
    stoploss_short := high>ph ? high : ph
// } End of Pivot-points and stop-loss logic

// **** Trade counter and partial closing mechanism **** {
var int trade_id=0
if GoLong or GoShort
    trade_id:=trade_id[1]+1

TakePartialProfitLong = barssince(GoLong)<barssince(GoShort) and crossover(high,(valuewhen(GoLong,close,0)+TakePartialProfitLevel*syminfo.mintick))
TakePartialProfitShort = barssince(GoLong)>barssince(GoShort) and crossunder(low,(valuewhen(GoShort,close,0)-TakePartialProfitLevel*syminfo.mintick))
// } End of Trade counter and partial closing mechanism


strategy.entry("Long", strategy.long, when=GoLong)
strategy.exit("XPartLong", from_entry="Long", qty_percent=50, profit=TakePartialProfitLevel)
strategy.exit("XLong", from_entry="Long", stop=stoploss_long, profit=TakeProfitLevel)
strategy.entry("Short", strategy.short, when=GoShort)
strategy.exit("XPartShort", from_entry="Short", qty_percent=50, profit=TakePartialProfitLevel)
strategy.exit("XShort", from_entry="Short", stop=stoploss_short, profit=TakeProfitLevel)


// alertcondition("Long", when=GoLong, message="long slprice={{stoploss_long}} tradeid={{trade_id}} tp=TakeProfitLevel")
// alertcondition("Short", when=GoShort, message="short slprice={{stoploss_short}} tradeid={{trade_id}} tp=TakeProfitLevel")
// alertcondition("ClosePartLong", when=TakePartialProfitLong, message="closepart tradeit={{trade_id}} part=0.5")
// alertcondition("ClosePartShort", when=TakePartialProfitShort, message="closepart tradeit={{trade_id}} part=0.5")


আরো