
यह रणनीति सुपरट्रेंड संकेतक पर आधारित एक उन्नत प्रवृत्ति-अनुसरण ट्रेडिंग प्रणाली है, जो एकाधिक संकेत पुष्टि तंत्र और गतिशील स्थिति प्रबंधन को जोड़ती है। रणनीति का मूल उद्देश्य एटीआर (औसत वास्तविक रेंज) के माध्यम से सुपरट्रेंड लाइन की गणना करना, तथा बाजार के रुझानों को बुद्धिमानी से समझने के लिए मूल्य रुझानों और होल्डिंग समय विंडो के आधार पर ट्रेडिंग सिग्नल उत्पन्न करना है।
यह रणनीति तीन-स्तरीय सिग्नल फ़िल्टरिंग तंत्र का उपयोग करती है:
पूंजी प्रबंधन के संदर्भ में, रणनीति एकल लेनदेन मात्रा के रूप में खाता इक्विटी का 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)