
এই কৌশলটি দুটি ট্র্যাকিং স্টপপস স্থাপন করে, ডাবল ট্র্যাকিং স্টপস দ্বারা ক্ষতি সীমাবদ্ধ করে এবং বিভিন্ন প্যারামিটার সেট করে যাতে বাজারের শব্দটি ফিল্টার করা যায় এবং প্রবণতা আরও স্পষ্ট হলে ক্রয় করা যায়।
এই কৌশলটি মূলত দুটি ট্র্যাকিং স্টপ পয়েন্ট long_1 এবং long_2 দ্বারা কেনার সময় নির্ধারণ করে। যার মধ্যে long_1 দীর্ঘমেয়াদী প্রবণতা অনুসরণ করে, long_2 স্বল্পমেয়াদী প্রবণতা অনুসরণ করে। একই সাথে profit1 এবং profit2 কে স্টপ পয়েন্ট হিসাবে সেট করে।
যদি দাম লং_১ এর চেয়ে বেশি হয়, তবে বাজারটি দীর্ঘমেয়াদী উত্থানের প্রবণতায় রয়েছে, এই সময়ে যদি দাম লং_২ এর চেয়ে কম হয়, তবে শর্টার্মটি পুনরুদ্ধার করার জন্য ভাল প্রবেশের সময় সরবরাহ করে, তবে প্রবেশ করুন; যদি দাম লং_১ এর চেয়ে কম হয়, তবে দীর্ঘমেয়াদী কোনও প্রবণতা নির্ধারণ করে না, যদি দাম লং_২ এর চেয়ে বেশি হয়, তবে শর্টার্মটি রিবাউন্ডের জন্যও প্রবেশ করা যেতে পারে।
প্রবেশের পরে, দুটি ট্র্যাকিং স্টপ লস পয়েন্ট সেট করুন - স্টপ লস 1 এবং স্টপ লস 2 - এবং প্রফিট 1 এবং প্রফিট 2 এর সাথে সর্বোচ্চ মান তুলনা করুন, যার ফলে মুনাফা লক হবে।
দীর্ঘ এবং লাভের প্যারামিটারগুলি যথাযথভাবে সামঞ্জস্য করে কৌশলটিকে আরও আগ্রহী করা যায়, ব্যবসায়ের সংখ্যা বাড়ানো যায়। একই সাথে স্টপ লস পয়েন্ট অ্যালগরিদমকে অপ্টিমাইজ করা যায় এবং স্বয়ংক্রিয়ভাবে সামঞ্জস্য করা যায়।
এই কৌশলটি সামগ্রিকভাবে সংরক্ষণশীল এবং স্থিতিশীল বৃদ্ধির জন্য উপযুক্ত। প্যারামিটার সমন্বয় এবং স্টপ লস অ্যালগরিদমের অপ্টিমাইজেশনের মাধ্যমে কৌশলটির আগ্রাসনযোগ্যতা যথাযথভাবে বাড়ানো যেতে পারে। এছাড়াও, বাজার শব্দ ফিল্টার করার জন্য একটি যন্ত্রপাতি বৃদ্ধি করাও একটি পরবর্তী অপ্টিমাইজেশনের দিক।
/*backtest
start: 2023-11-19 00:00:00
end: 2023-12-19 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("Turtle Project",overlay= true)
//-----------------------------------------------------------
entry_1 = input(55)
profit_1 = input(20)
long_1 = float(na)
long_1:= if high[entry_1] >= highest(high,entry_1)
high[entry_1]
else
long_1[1]
profit1 = float(na)
profit1:= if low[profit_1] <= lowest(low,profit_1)
low[profit_1]
else
profit1[1]
//-----------------------------------------------------------
entry_2 = input(20)
profit_2 = input(10)
long_2 = float(na)
long_2:= if high[entry_2] >= highest(high,entry_2)
high[entry_2]
else
long_2[1]
profit2 = float(na)
profit2:= if low[profit_2] <= lowest(low,profit_2)
low[profit_2]
else
profit2[1]
//------------------------------------------------------------
stoploss_1= lowest(low,1) < long_1 and highest(high,1) > long_1
stoploss_2= lowest(low,1) < long_2 and highest(high,1) > long_2
stop_1 = input(1)/100
stop_2 = input(2)/100
plotchar(stoploss_1, "high1", "▲",location.top,color=color.red )
plotchar(stoploss_2, "high2", "▲",location.top,color=color.blue)
//------------------------------------------------------------
if strategy.position_size == 0
if low < long_1
if high < long_1
strategy.entry("longlong_4",strategy.long, stop=long_1)
if strategy.position_size == 0
if low > long_1
if high < long_2
strategy.entry("longlong_3",strategy.long, stop=long_2)
stoploss1 = float(na)
stoploss1:= stoploss_1 ? strategy.position_avg_price * (1 - stop_1) : stoploss1[1]
stoploss__1 = max(stoploss1,profit1)
if high > long_1 and strategy.position_size > 0
strategy.exit("exit_1 ","longlong_4",stop=stoploss__1)
stoploss2 = float(na)
stoploss2:= stoploss_2 ? strategy.position_avg_price * (1 - stop_2) : stoploss2[1]
stoploss__2 = max(stoploss2,profit2)
if high > long_2 and strategy.position_size > 0
strategy.exit("exit_2 ","longlong_3",stop=stoploss__2)
//--------------------------------------------------------------
plot(long_1,color=color.red ,linewidth=3)
plot(long_2,color=color.blue,linewidth=3)
plot(profit1,color=color.red, linewidth=1)
plot(profit2,color=color.blue, linewidth=1)
//plot(stoploss__1,style=plot.style_circles, color=color.yellow)
//plot(stoploss__2,style=plot.style_circles, color=color.yellow)
plot(stoploss1,style=plot.style_circles, color=color.blue)
plot(stoploss2,style=plot.style_circles, color=color.red)
//--------------------------------------------------------------