
এই কৌশলটি একটি মাল্টি-ডাইমেনশনাল ট্রেডিং সিস্টেম যা প্রবণতা ট্র্যাকিং, গতিশীলতা সূচক এবং স্বতঃস্ফূর্ত স্টপ লসকে একত্রিত করে। কৌশলটি সুপারট্রেন্ড সূচকের মাধ্যমে বাজারের প্রবণতার দিকটি সনাক্ত করে, আরএসআই গতিশীলতা সূচক এবং গড় লাইন সিস্টেমের সাথে একত্রে লেনদেনের নিশ্চিতকরণ করে এবং এটিআর অস্থিরতা সূচক ব্যবহার করে গতিশীল স্টপ লস পরিচালনা করে। এই মাল্টি-ডাইমেনশনাল বিশ্লেষণ পদ্ধতিটি কার্যকরভাবে বাজারের প্রবণতা ক্যাপচার করতে পারে, যখন ঝুঁকিটি যুক্তিসঙ্গতভাবে নিয়ন্ত্রণ করা যায়।
কৌশলটির মূল যুক্তি নিম্নলিখিত তিনটি মাত্রার উপর ভিত্তি করে:
ক্রয়ের শর্তগুলি একই সাথে পূরণ করা দরকারঃ সুপারট্রেন্ডের সূচক ((সবুজ) + আরএসআই <65+ মূল্য 50 চক্রের গড়ের উপরে বিক্রির শর্তঃ সুপারট্রেন্ডের পতনের পর পজিশন খালি করা। স্টপ ম্যানেজমেন্টঃ এটিআর ভিত্তিক ট্র্যাকিং স্টপ ব্যবহার করে, এটিআর মানের 1.5 গুণ স্টপ দূরত্ব।
এই কৌশলটি প্রবণতা ট্র্যাকিং, গতিশীলতা এবং সমান্তরাল সিস্টেমের সমন্বিত প্রয়োগের মাধ্যমে একটি যৌক্তিকভাবে সম্পূর্ণ ট্রেডিং সিস্টেম তৈরি করে। কৌশলটির সুবিধা হল মাল্টি-ডাইমেনশনাল সিগন্যাল কনফার্মেশন মেকানিজম এবং একটি উন্নত ঝুঁকি নিয়ন্ত্রণ ব্যবস্থা। প্রদান করা অপ্টিমাইজড দিকনির্দেশের মাধ্যমে, কৌশলটি আরও উন্নত করার জায়গা রয়েছে। কৌশলটির মূল যুক্তি বজায় রাখার পাশাপাশি বিভিন্ন বাজারের পরিস্থিতিতে এর অভিযোজনযোগ্যতা বাড়ানোর উপর জোর দেওয়া হয়েছে।
/*backtest
start: 2025-01-08 00:00:00
end: 2025-02-07 00:00:00
period: 3h
basePeriod: 3h
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/
// © Gladston_J_G
//@version=5
strategy("Trend Strategy with Stop Loss", overlay=true, margin_long=100, margin_short=100)
// ———— Inputs ———— //
atrLength = input(14, "ATR Length")
supertrendMultiplier = input(3.0, "Supertrend Multiplier")
rsiLength = input(14, "RSI Length")
maLength = input(50, "MA Length")
trailOffset = input(1.5, "Trailing Stop ATR Multiplier")
// ———— Indicators ———— //
// Supertrend for trend direction
[supertrend, direction] = ta.supertrend(supertrendMultiplier, atrLength)
// RSI for momentum filter
rsi = ta.rsi(close, rsiLength)
// Moving Average for trend confirmation
ma = ta.sma(close, maLength)
// ATR for volatility-based stop loss
atr = ta.atr(atrLength)
// ———— Strategy Logic ———— //
// Buy Signal: Supertrend bullish + RSI not overbought + Price above MA
buyCondition = direction < 0 and rsi < 65 and close > ma
// Sell Signal: Supertrend turns bearish
sellCondition = direction > 0
// ———— Stop Loss & Trailing ———— //
stopPrice = close - (atr * trailOffset)
var float trail = na
if buyCondition and strategy.position_size == 0
trail := stopPrice
else
trail := math.max(stopPrice, nz(trail[1]))
// ———— Execute Orders ———— //
strategy.entry("Long", strategy.long, when=buyCondition)
strategy.close("Long", when=sellCondition)
strategy.exit("Trail Exit", "Long", stop=trail)
// ———— Visuals ———— //
plot(supertrend, "Supertrend", color=direction < 0 ? color.green : color.red)
plot(ma, "MA", color=color.blue)
plot(strategy.position_size > 0 ? trail : na, "Trailing Stop", color=color.orange, style=plot.style_linebr)
// ———— Alerts ———— //
plotshape(buyCondition, "Buy", shape.triangleup, location.belowbar, color.green, size=size.small)
plotshape(sellCondition, "Sell", shape.triangledown, location.abovebar, color.red, size=size.small)
plot(close)