
এই কৌশলটি একটি ট্রেডিং সিস্টেম যা বহু-চক্রের গড়ের উপর ভিত্তি করে ট্রেডিং ট্রেডিং সিস্টেম। কৌশলটি 89-চক্র এবং 21-চক্রের সরল চলমান গড় (এসএমএ) ব্যবহার করে বাজারটির সামগ্রিক প্রবণতার দিকনির্দেশের জন্য এবং 5-চক্রের সূচকের চলমান গড় (ইএমএ) এর উচ্চতা এবং নিম্নের সাথে মিলিত হয় নির্দিষ্ট ট্রেডিং সংকেত সন্ধান করার জন্য। কৌশলটি দ্বৈত পজিশন ম্যানেজমেন্ট পদ্ধতি গ্রহণ করে এবং ঝুঁকি নিয়ন্ত্রণের জন্য স্থির স্টপ লস এবং ট্র্যাকিং স্টপগুলি ব্যবহার করে।
কৌশলটির মূল যুক্তিতে নিম্নলিখিত মূল উপাদানগুলি অন্তর্ভুক্ত রয়েছে:
এই কৌশলটি একটি কাঠামোগত প্রবণতা ট্র্যাকিং সিস্টেম, যা বহু-চক্রের গড় সমন্বয় দ্বারা বাজার প্রবণতা ক্যাপচার করে এবং একটি নমনীয় পজিশন পরিচালনা এবং স্টপ লস পদ্ধতি ব্যবহার করে ঝুঁকি নিয়ন্ত্রণ করে। যদিও কিছু অপ্টিমাইজেশনের জায়গা রয়েছে, তবে কৌশলটির মৌলিক কাঠামোটি ভাল ব্যবহারযোগ্যতা এবং স্কেলযোগ্যতার সাথে রয়েছে। বিভিন্ন ধরণের লেনদেনের জাত এবং বাজারের পরিবেশের জন্য, প্যারামিটারগুলি সামঞ্জস্য করে এবং ফিল্টার শর্তগুলি যুক্ত করে কৌশলটির স্থায়িত্ব বাড়ানো যেতে পারে।
/*backtest
start: 2024-11-12 00:00:00
end: 2024-12-11 08:00:00
period: 2h
basePeriod: 2h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © tobiashartemink2
//@version=5
strategy("High 5 Trading Technique", overlay=true)
// --- Input parameters ---
sma89Length = input.int(title="SMA 89 Length", defval=89)
sma21Length = input.int(title="SMA 21 Length", defval=21)
ema5HighLength = input.int(title="EMA 5 High Length", defval=5)
ema5LowLength = input.int(title="EMA 5 Low Length", defval=5)
contracts = input.int(title="Aantal Contracten", defval=1)
stopLossPoints = input.int(title="Stop Loss Points per Contract", defval=25)
takeProfitPoints = input.int(title="Take Profit Points per Contract", defval=25)
// --- Calculate moving averages ---
sma89 = ta.sma(close, sma89Length)
sma21 = ta.sma(close, sma21Length)
ema5High = ta.ema(high, ema5HighLength)
ema5Low = ta.ema(low, ema5LowLength)
// --- Identify trend and order of moving averages ---
longSetup = close > sma89 and close > sma21 and ema5High > sma21 and sma21 > sma89
shortSetup = close < sma89 and close < sma21 and ema5Low < sma21 and sma21 < sma89
// --- Entry signals ---
longTrigger = longSetup and close <= ema5Low
shortTrigger = shortSetup and close >= ema5High
// --- Entry orders ---
if (longTrigger)
strategy.entry("Long 1", strategy.long, qty=contracts)
strategy.entry("Long 2", strategy.long, qty=contracts)
if (shortTrigger)
strategy.entry("Short 1", strategy.short, qty=contracts)
strategy.entry("Short 2", strategy.short, qty=contracts)
// --- Stop-loss and take-profit for long positions ---
if (strategy.position_size > 0)
strategy.exit("Exit Long 1", "Long 1", stop=strategy.position_avg_price - stopLossPoints, limit=strategy.position_avg_price + takeProfitPoints)
strategy.exit("Exit Long 2", "Long 2", stop=strategy.position_avg_price - stopLossPoints, trail_offset=takeProfitPoints, trail_points=takeProfitPoints)
// --- Stop-loss and take-profit for short positions ---
if (strategy.position_size < 0)
strategy.exit("Exit Short 1", "Short 1", stop=strategy.position_avg_price + stopLossPoints, limit=strategy.position_avg_price - takeProfitPoints)
strategy.exit("Exit Short 2", "Short 2", stop=strategy.position_avg_price + stopLossPoints, trail_offset=takeProfitPoints, trail_points=takeProfitPoints)
// --- Plot moving averages ---
plot(sma89, color=color.blue, linewidth=2)
plot(sma21, color=color.red, linewidth=2)
plot(ema5High, color=color.green, linewidth=2)
plot(ema5Low, color=color.orange, linewidth=2)