
এই কৌশলটি সুপারট্রেন্ড নির্দেশকের উপর ভিত্তি করে ট্রেডিং সিস্টেম অনুসরণ করে একটি উন্নত প্রবণতা, যা একাধিক সংকেত নিশ্চিতকরণ প্রক্রিয়া এবং গতিশীল অবস্থান ব্যবস্থাপনাকে একত্রিত করে। কৌশলটির মূল হল ATR (গড় সত্যিকারের প্রশস্ততা) এর মাধ্যমে সুপারট্রেন্ড লাইন গণনা করা এবং বাজারের প্রবণতাগুলির বুদ্ধিমান ক্যাপচার অর্জনের জন্য মূল্য প্রবণতা এবং অবস্থানের সময় উইন্ডোগুলির উপর ভিত্তি করে ট্রেডিং সংকেত তৈরি করা।
কৌশলটি একটি তিন-স্তর সংকেত ফিল্টারিং প্রক্রিয়া গ্রহণ করে:
তহবিল ব্যবস্থাপনার ক্ষেত্রে, কৌশলটি একক লেনদেনের পরিমাণ হিসাবে অ্যাকাউন্টের 15% ব্যবহার করে এই রক্ষণশীল অবস্থান নিয়ন্ত্রণ ঝুঁকি ব্যবস্থাপনায় সহায়তা করে।
এটি একটি সুগঠিত এবং কঠোর যুক্তি সহ একটি প্রবণতা ট্র্যাকিং কৌশল যা একাধিক সংকেত নিশ্চিতকরণ প্রক্রিয়া এবং একটি সম্পূর্ণ ঝুঁকি ব্যবস্থাপনা সিস্টেমের মাধ্যমে এটির ব্যবহারিক প্রয়োগের মান রয়েছে৷ কৌশলটি অত্যন্ত পরিমাপযোগ্য, এবং প্রস্তাবিত অপ্টিমাইজেশন নির্দেশাবলীর মাধ্যমে এর স্থিতিশীলতা এবং লাভজনকতা আরও উন্নত করা যেতে পারে।
/*backtest
start: 2024-12-06 00:00:00
end: 2025-01-04 08:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Supertrend Strategy", overlay=true)
atrPeriod = input(10, "ATR Length")
factor = input.float(3.0, "Factor", step=0.01)
// Compute supertrend values
[supertrendValue, supertrendDirection] = ta.supertrend(factor, atrPeriod)
var float direction = na
if not na(supertrendDirection[1]) and supertrendDirection[1] != supertrendDirection
direction := supertrendDirection > 0 ? 1 : -1
// Variables to track conditions
var int lastShortTime = na
var int lastLongTime = na
// Detecting short and long entries
if direction == -1
strategy.entry("My Short Entry Id", strategy.short)
lastShortTime := bar_index
if direction == 1
strategy.entry("My Long Entry Id", strategy.long)
lastLongTime := bar_index
// Custom signal logic
bool bullishSignal = false
bool bearishSignal = false
// Define bullish signal conditions
if not na(lastShortTime) and (bar_index - lastShortTime >= 15 and bar_index - lastShortTime <= 19)
if close > open and close[1] > open[1] and close[2] > open[2]
bullishSignal := true
// Define bearish signal conditions
if not na(lastLongTime) and (bar_index - lastLongTime >= 15 and bar_index - lastLongTime <= 19)
if close < open and close[1] < open[1] and close[2] < open[2]
bearishSignal := true
// Plot signals
if bullishSignal
strategy.entry("Bullish Upward Signal", strategy.long)
label.new(bar_index, close, text="Bullish", style=label.style_circle, color=color.green, textcolor=color.white)
if bearishSignal
strategy.entry("Bearish Downward Signal", strategy.short)
label.new(bar_index, close, text="Bearish", style=label.style_circle, color=color.red, textcolor=color.white)
// Optionally plot the strategy equity
//plot(strategy.equity, title="Equity", color=color.red, linewidth=2, style=plot.style_areabr)