
Die Strategie kombiniert das Konzept von Vector Candles mit der traditionellen Kennzeichnung von Channel Breakout und Chocolate Sauce (ChoCH) -Methoden, um Marktdurchbrüche zu erfassen. Die Strategie bestätigt die Signale, indem sie den Kurs mit den Höhen und Tiefen der vorherigen K-Linien vergleicht, und kombiniert die synthetisch hochwertigen Vector Candles mit einer bestimmten Anzahl von Bestätigungs-K-Linien, um den Lärm zu filtern.
Die Strategie kombiniert innovativ Vector Filtering mit klassischen Channel Breakout und ChoCH Modellen, um die Zuverlässigkeit und Erkennbarkeit der Signale durch Farbdifferenzierung und Bestätigung der K-Linien-Mechanismen zu verbessern. Der Vorteil der Strategie liegt in der Klarheit der Regeln, der Intuition der Signale und der Flexibilität und Optimierbarkeit. Die Strategie birgt jedoch auch einige Einschränkungen und Risiken, wie z. B. schlechte Performance bei Marktschwankungen, unzureichende Kenntnis von Markttrends und mangelnde Stop-Loss-Management.
/*backtest
start: 2024-02-01 00:00:00
end: 2024-02-29 23:59:59
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
strategy("Custom ChoCH and BOS Strategy with Vector Candles", overlay=true)
// Input Parameters
length = input(10, title="Lookback Length for Volume")
volMultiplier = input(2.0, title="Volume Multiplier for Vector Candles")
confirmationCandles = input(3, title="Confirmation Candles")
// Calculate the average volume of the last 'length' candles
avgVol = sma(volume, length)
// Vector Candle Definitions
vectorCandleRed = (close < open) and (volume > avgVol * volMultiplier) ? 1.0 : 0.0
vectorCandleGreen = (close > open) and (volume > avgVol * volMultiplier) ? 1.0 : 0.0
vectorCandleBlue = (close < open) and (volume > avgVol * 1.5) ? 1.0 : 0.0 // 150% volume for blue
vectorCandlePurple = (close > open) and (volume > avgVol * 1.5) ? 1.0 : 0.0 // 150% volume for purple
// Detecting BOS and ChoCH
isRedChoCH = vectorCandleRed > 0 and (close < low[1]) // Red ChoCH
isGreenBOS = vectorCandleGreen > 0 and (close > high[1]) // Green BOS
// Confirmation Logic
redChoCHConfirmed = (sum(vectorCandleRed, confirmationCandles) >= 2) ? 1.0 : 0.0
greenBOSConfirmed = (sum(vectorCandleGreen, confirmationCandles) >= 2) ? 1.0 : 0.0
// Entry Conditions
buyCondition = redChoCHConfirmed > 0
sellCondition = greenBOSConfirmed > 0
// Strategy Execution
if (buyCondition)
strategy.entry("Buy", strategy.long)
if (sellCondition)
strategy.close("Buy")
// Plotting Vector Candles and Signals
plotshape(series=isRedChoCH, title="Red ChoCH Signal", location=location.belowbar, color=color.red, style=shape.circle, text="Red ChoCH")
plotshape(series=isGreenBOS, title="Green BOS Signal", location=location.abovebar, color=color.green, style=shape.circle, text="Green BOS")
// Plotting Vector Candles for Visualization
plotchar(vectorCandleRed > 0, title="Vector Candle Red", location=location.belowbar, color=color.red, char='R', text="Red")
plotchar(vectorCandleGreen > 0, title="Vector Candle Green", location=location.abovebar, color=color.green, char='G', text="Green")
plotchar(vectorCandleBlue > 0, title="Vector Candle Blue", location=location.belowbar, color=color.blue, char='B', text="Blue")
plotchar(vectorCandlePurple > 0, title="Vector Candle Purple", location=location.abovebar, color=color.purple, char='P', text="Purple")