
यह रणनीति दो अलग-अलग चक्रों की VWAP लाइनों के क्रॉसिंग पर आधारित है और RSI संकेतकों के साथ मिलकर ट्रेडिंग सिग्नल की पुष्टि करती है। जब कीमत VWAP लाइन को ऊपर की ओर तोड़ती है और RSI ओवरसोल स्तर से ऊपर होती है तो एक मल्टी सिग्नल उत्पन्न होता है; जब कीमत VWAP लाइन को नीचे की ओर तोड़ती है और RSI ओवरसोल स्तर से नीचे होती है तो एक रिक्त सिग्नल उत्पन्न होती है। यह रणनीति VWAP के सापेक्ष मूल्य के ब्रेकआउट को पकड़ने के लिए बनाई गई है, जबकि RSI संकेतकों का उपयोग संभावित झूठे ब्रेकआउट सिग्नल को फ़िल्टर करने के लिए किया जाता है।
व्यय भारित औसत मूल्य और अपेक्षाकृत मजबूत सूचकांक क्रॉसिंग रणनीति एक सरल और आसान व्यापार विधि है, जो कीमतों के सापेक्ष वीडब्ल्यूपी के ब्रेकआउट को पकड़कर संभावित लाभ प्राप्त करती है। लेकिन इस रणनीति में पैरामीटर अनुकूलन, अस्थिर बाजार प्रदर्शन और जोखिम प्रबंधन की कमी जैसी समस्याएं भी हैं। बहु-समय चक्र विश्लेषण, अन्य तकनीकी संकेतकों के साथ संयोजन, अनुकूलित बाहर निकलने के नियम और जोखिम नियंत्रण जैसी विधियों को शामिल करके रणनीति की स्थिरता और व्यावहारिकता को और बढ़ाया जा सकता है। व्यापारियों को इस रणनीति को लागू करने के लिए अपनी ट्रेडिंग शैली और बाजार विशेषताओं के संयोजन में उचित समायोजन और अनुकूलन की आवश्यकता होती है।
/*backtest
start: 2023-05-05 00:00:00
end: 2024-05-10 00:00:00
period: 2d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("VWAP and RSI Strategy with Alerts", overlay=true)
// Inputs
cumulativePeriod = input(20, "Rolling Period for VWAP", minval=1)
rsiPeriod = input(20, "RSI Period", minval=1)
rsiOverbought = input(70, "RSI Overbought Level")
rsiOversold = input(30, "RSI Oversold Level")
tradeQty = input(1, "Trade Quantity", minval=0.01) // Cantidad de la operación
// VWAP Calculation
typicalPrice = (high + low + close) / 3
typicalPriceVolume = typicalPrice * volume
cumulativeTypicalPriceVolume = sum(typicalPriceVolume, cumulativePeriod)
cumulativeVolume = sum(volume, cumulativePeriod)
vwapValue = cumulativeTypicalPriceVolume / cumulativeVolume
plot(vwapValue, color=color.blue, title="VWAP")
// RSI Calculation
rsiValue = rsi(close, rsiPeriod)
hline(rsiOverbought, "Overbought", color=color.red)
hline(rsiOversold, "Oversold", color=color.green)
// Entry Conditions
longCondition = crossover(close, vwapValue) and rsiValue > rsiOversold
shortCondition = crossunder(close, vwapValue) and rsiValue < rsiOverbought
// Strategy Execution for Entries
if (longCondition)
strategy.entry("Long", strategy.long, qty=tradeQty)
if (shortCondition)
strategy.entry("Short", strategy.short, qty=tradeQty)
// Conditions for Exiting
exitLongCondition = crossunder(close, vwapValue) or rsiValue > rsiOverbought // Salir de long cuando el precio cruce debajo del VWAP o el RSI sea alto
exitShortCondition = crossover(close, vwapValue) or rsiValue < rsiOversold // Salir de short cuando el precio cruce por encima del VWAP o el RSI sea bajo
// Strategy Execution for Exits
strategy.exit("Exit Long", "Long", when=exitLongCondition)
strategy.exit("Exit Short", "Short", when=exitShortCondition)
// Alert Conditions
alertcondition(longCondition, title="Enter Long", message="ENTER-LONG_BINANCE-FUTURES_BTCUSDT_WunderTrading-1_1M_1354a524d74bc295")
alertcondition(exitLongCondition, title="Exit Long", message="EXIT-LONG_BINANCE-FUTURES_BTCUSDT_WunderTrading-1_1M_1354a524d74bc295")
alertcondition(shortCondition, title="Enter Short", message="ENTER-SHORT_BINANCE-FUTURES_BTCUSDT_WunderTrading-1_1M_1354a524d74bc295")
alertcondition(exitShortCondition, title="Exit Short", message="EXIT-SHORT_BINANCE-FUTURES_BTCUSDT_WunderTrading-1_1M_1354a524d74bc295")