
यह एक स्मार्ट ट्रेडिंग रणनीति है जो ब्रेकआउट संरचना (बीओएस) और ट्रेड वॉल्यूम की पुष्टि पर आधारित है। यह रणनीति मूल्य की निगरानी के माध्यम से पूर्व-उच्च या निम्न स्तर को तोड़ती है, और ट्रेड वॉल्यूम को बढ़ाने के साथ मिलकर ट्रेड सिग्नल बनाती है। रणनीति में ट्रेड की विश्वसनीयता और जोखिम नियंत्रण क्षमता बढ़ाने के लिए लगातार पुष्टि की आवश्यकताओं और गतिशील स्टॉप-लॉस सेटिंग्स सहित बहु-शर्त सत्यापन तंत्र शामिल हैं।
रणनीति के मूल तर्क में निम्नलिखित प्रमुख तत्व शामिल हैं:
यह एक रणनीतिक प्रणाली है जो तकनीकी विश्लेषण के क्लासिक सिद्धांतों और आधुनिक मात्रात्मक व्यापार विधियों को जोड़ती है। बहु-शर्त सत्यापन और सख्त जोखिम नियंत्रण के माध्यम से, रणनीति में अच्छी स्थिरता और विश्वसनीयता है। हालांकि कुछ पहलुओं को अनुकूलित करने की आवश्यकता है, लेकिन समग्र ढांचे का डिजाइन उचित है और इसका अच्छा युद्ध अनुप्रयोग मूल्य है।
/*backtest
start: 2019-12-23 08:00:00
end: 2024-12-18 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("BOS and Volume Strategy with Confirmation", overlay=true)
// Parameters
swingLength = input.int(20, title="Swing Length", minval=1)
volumeMultiplier = input.float(1.1, title="Volume Multiplier", step=0.1)
volumeSMA_length = input.int(10, title="Volume SMA Length", minval=1)
takeProfitPercentage = input.float(0.02, title="Take Profit Percentage", step=0.01)
stopLossPercentage = input.float(0.15, title="Stop Loss Percentage", step=0.01) // New parameter for stop loss
atrLength = input.int(14, title="ATR Length")
confirmationBars = input.int(2, title="Confirmation Bars", minval=1)
// Calculate Swing Highs and Lows
swingHigh = ta.highest(high, swingLength)[1]
swingLow = ta.lowest(low, swingLength)[1]
// Calculate Volume Moving Average
volumeSMA = ta.sma(volume, volumeSMA_length)
highVolume = volume > (volumeSMA * volumeMultiplier)
// Break of Structure Detection with Confirmation
var int bullishCount = 0
var int bearishCount = 0
if (close > swingHigh and highVolume)
bullishCount := bullishCount + 1
bearishCount := 0
else if (close < swingLow and highVolume)
bearishCount := bearishCount + 1
bullishCount := 0
else
bullishCount := 0
bearishCount := 0
bullishBOSConfirmed = (bullishCount >= confirmationBars)
bearishBOSConfirmed = (bearishCount >= confirmationBars)
// Entry and Exit Conditions
var float entryPrice = na // Declare entryPrice as a variable
if (bullishBOSConfirmed and strategy.position_size <= 0)
entryPrice := close // Use ':=' for assignment
strategy.entry("Long", strategy.long)
if (strategy.position_size > 0)
// Calculate stop loss price
stopLossPrice = entryPrice * (1 - stopLossPercentage)
strategy.exit("Take Profit Long", from_entry="Long", limit=entryPrice * (1 + takeProfitPercentage), stop=stopLossPrice)
if (bearishBOSConfirmed and strategy.position_size >= 0)
entryPrice := close // Use ':=' for assignment
strategy.entry("Short", strategy.short)
if (strategy.position_size < 0)
// Calculate stop loss price
stopLossPrice = entryPrice * (1 + stopLossPercentage)
strategy.exit("Take Profit Short", from_entry="Short", limit=entryPrice * (1 - takeProfitPercentage), stop=stopLossPrice)
// Plot Swing Highs and Lows for Visualization
plot(swingHigh, title="Swing High", color=color.green, linewidth=1)
plot(swingLow, title="Swing Low", color=color.red, linewidth=1)