
यह रणनीति एक गतिशील सपाट स्थिति रणनीति है जो एक अपेक्षाकृत मजबूत सूचकांक ((आरएसआई) पर आधारित है, जो बाजार की प्रवृत्ति को पकड़ने के लिए गतिशील खुले और बंद स्थितियों को स्थापित करता है। यह रणनीति एक व्यापार संकेत उत्पन्न करती है जब आरएसआई सूचक ओवरबॉट ओवरसोल स्तर को पार कर जाता है, और एक अद्वितीय गतिशील सपाट स्थिति तंत्र को पेश करता है जो विभिन्न आरएसआई स्तरों पर सपाट स्थिति स्थितियों को स्थापित करके व्यापार प्रदर्शन को अनुकूलित करता है। यह रणनीति एक पूर्ण मल्टी-होम ट्रेडिंग सिस्टम का उपयोग करती है, जो बाजार में द्वि-दिशात्मक उतार-चढ़ाव में व्यापार के अवसरों को पकड़ने में सक्षम है।
रणनीति के मूल तर्क में निम्नलिखित प्रमुख घटक शामिल हैं:
यह एक तर्कसंगत गतिशील ट्रेडिंग रणनीति है जो आरएसआई संकेतकों और गतिशील पीसिंग तंत्र के माध्यम से बाजार के अवसरों को पकड़ने के लिए डिज़ाइन की गई है। रणनीति की मुख्य विशेषताएं उच्च स्तर की प्रणालीगतता, पूर्ण जोखिम नियंत्रण और अनुकूलनशीलता हैं। हालांकि कुछ अंतर्निहित जोखिम हैं, लेकिन पैरामीटर अनुकूलन और कार्यक्षमता विस्तार के माध्यम से रणनीति में अभी भी बहुत सुधार की गुंजाइश है।
/*backtest
start: 2024-10-01 00:00:00
end: 2024-10-31 23:59:59
period: 3h
basePeriod: 3h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("RSI Strategy with Close Levels", shorttitle="RSI Strat", overlay=true)
// RSI Input settings
rsiLength = input.int(14, title="RSI Length")
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
rsiCloseLongLevel = input.int(60, title="RSI Level to Close Long Position")
rsiCloseShortLevel = input.int(40, title="RSI Level to Close Short Position")
// Calculate RSI
rsi = ta.rsi(close, rsiLength)
// Generate buy and sell signals based on RSI levels
buySignal = ta.crossover(rsi, rsiOversold)
sellSignal = ta.crossunder(rsi, rsiOverbought)
// Check if there are open positions
var bool inPosition = na
if (strategy.opentrades > 0)
inPosition := true
else
inPosition := false
// Open long position on buy signal if not already in a position
if (buySignal and not inPosition)
strategy.entry("Buy", strategy.long)
inPosition := true
// Close long position on sell signal or when RSI reaches the close long level
if (inPosition and strategy.position_size > 0 and (sellSignal or rsi >= rsiCloseLongLevel))
strategy.close("Buy")
inPosition := false
// Open short position on sell signal if not already in a position
if (sellSignal and not inPosition)
strategy.entry("Sell", strategy.short)
inPosition := true
// Close short position on buy signal or when RSI reaches the close short level
if (inPosition and strategy.position_size < 0 and (buySignal or rsi <= rsiCloseShortLevel))
strategy.close("Sell")
inPosition := false
// Plot buy and sell signals
//plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
//plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// Plot RSI for visualization
hline(rsiOverbought, "RSI Overbought", color=color.red)
hline(rsiOversold, "RSI Oversold", color=color.green)
hline(rsiCloseLongLevel, "RSI Close Long Level", color=color.blue)
hline(rsiCloseShortLevel, "RSI Close Short Level", color=color.purple)
plot(rsi, title="RSI", color=color.orange)