Supertrend Enhanced Engulfing Pattern Dynamische Risikokontrollstrategie

ATR SL TP CANDLE supertrend ENGULFING
Erstellungsdatum: 2025-02-20 15:32:32 zuletzt geändert: 2025-02-20 15:32:32
Kopie: 6 Klicks: 319
2
konzentrieren Sie sich auf
319
Anhänger

Supertrend Enhanced Engulfing Pattern Dynamische Risikokontrollstrategie Supertrend Enhanced Engulfing Pattern Dynamische Risikokontrollstrategie

Überblick

Dies ist eine hochwertige Handelsstrategie, die den Supertrend-Indikator und die Verschluckform kombiniert. Die Strategie ermöglicht eine genaue Auswahl von Handelssignalen durch die Identifizierung von Verschluckform-Plattform-Mustern im Markt und die Bestätigung der Trendrichtung in Verbindung mit dem Supertrend-Indikator. Die Strategie integriert auch dynamische Stop-Loss- und Profit-Einstellungen, um das Risiko effektiv zu kontrollieren und gleichzeitig den Gewinn zu sichern.

Strategieprinzip

Die Strategie basiert hauptsächlich auf folgenden Kernprinzipien:

  1. Der Supertrend-Indikator wird mit dem ATR (Average True Rate) berechnet, um die allgemeine Marktentwicklung zu bestimmen.
  2. Filtern Sie die effektiven Engulf-Formen aus, indem Sie den Boring Candle Threshold und den Engulfing Candle Threshold festlegen.
  3. Der Supertrend tritt nur dann auf, wenn die Richtung des Trends mit der der Verschluckform übereinstimmt.
  4. Die Stop-Loss- und Take-Profit-Positions sind dynamisch eingestellt und werden prozentual auf Basis des Eröffnungspreises berechnet.
  5. Mit strategischer Positionsverwaltung wird sichergestellt, dass nur eine Handelsrichtung gleichzeitig gehalten wird.

Strategische Vorteile

  1. Die Signalqualität wird streng kontrolliert und die Genauigkeit durch die doppelte Bestätigung ((Trend + Form)) erhöht.
  2. Die Einführung von Langeweile und Engulf-Threshold-Konzepten, um falsche Signale effektiv zu filtern.
  3. Die dynamische Supertrend-Berechnung basiert auf dem ATR, was die Strategie zu einer guten Marktadaptivität macht.
  4. Gute Stop-Loss- und Profit-Management-Mechanismen, die sowohl Risiken als auch Gewinne kontrollieren.
  5. Die Visualisierung ist perfekt, die Handelssignale, die Stop-Loss-Punkte und die Gewinnziele sind klar sichtbar.

Strategisches Risiko

  1. In den meisten Fällen ist es jedoch möglich, dass sich der Markt in einem unsicheren Zustand befindet.
  2. Die Fixed Stop-Loss- und Take-Profit-Einstellungen sind möglicherweise nicht für alle Marktbedingungen geeignet.
  3. Ein weiterer Trendwechsel könnte zu einem größeren Rückschlag führen.
  4. Die Einstellung von Parametern ist empfindlich, und falsche Parameter können zu einer schlechten Strategie führen.
  5. In weniger liquiden Märkten besteht die Gefahr eines Ausrutsches.

Richtung der Strategieoptimierung

  1. Die Einführung von Transfertindikatoren kann als Signalbestätigung dienen.
  2. Überlegen Sie, ATR-Multiplikator-Regulierungsmechanismen für dynamische ATR-Multiplikatoren einzusetzen.
  3. Die Stop-Loss- und Profit-Ratio wird dynamisch an die Marktfluktuation angepasst.
  4. Die Zeit-Filter werden hinzugefügt, um zu vermeiden, dass der Handel in unpassenden Zeiträumen stattfindet.
  5. Erwägen Sie, einen Trendstärkenfilter hinzuzufügen, um die Qualität des Handels zu verbessern.

Zusammenfassen

Es handelt sich um eine sorgfältig konzipierte, logisch klare Strategie, die durch die Kombination von technischen Indikatoren und Formanalyse eine bessere Signalqualitätskontrolle ermöglicht. Die Risikomanagementmechanismen der Strategie sind vervollständigt, die Visualisierung wirkt hervorragend und eignet sich für Tests und Optimierungen in der Praxis.

Strategiequellcode
/*backtest
start: 2024-02-21 00:00:00
end: 2024-06-01 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/

//@version=5
strategy('Strategy Engulfing', overlay=true)

// Inputs
Periods = input(title='ATR Period', defval=5)
src = input(hl2, title='Source')
Multiplier = input.float(title='ATR Multiplier', step=0.1, defval=1.0)
highlighting = input(title='Highlighter On/Off?', defval=true)
boringThreshold = input.int(5, title='Boring Candle Threshold (%)', minval=1, maxval=100, step=1)
engulfingThreshold = input.int(50, title='Engulfing Candle Threshold (%)', minval=1, maxval=100, step=1)
OpenPosisi = input.int(2000, title='OpenPosisi (Pips)', minval=-25000)
stoploss = input.int(10000, title='Stop Loss (Pips)', minval=-25000)
takeprofit = input.int(20000, title='Take Profit (Pips)', minval=-25000)

// ATR Calculation
atr = ta.atr(Periods)

// Supertrend Calculation
up = src - Multiplier * atr
up := close[1] > nz(up[1]) ? math.max(up, nz(up[1])) : up
dn = src + Multiplier * atr
dn := close[1] < nz(dn[1]) ? math.min(dn, nz(dn[1])) : dn
trend = 1
trend := nz(trend[1], trend)
trend := trend == -1 and close > dn[1] ? 1 : trend == 1 and close < up[1] ? -1 : trend

// Plotting Supertrend
plot(trend == 1 ? up : na, color=color.new(color.green, 0), linewidth=1, style=plot.style_linebr, title='Supertrend Up')
plot(trend == -1 ? dn : na, color=color.new(color.red, 0), linewidth=1, style=plot.style_linebr, title='Supertrend Down')

// Engulfing Candlestick
isBoringCandle = math.abs(open[1] - close[1]) <= (high[1] - low[1]) * boringThreshold / 100
isEngulfingCandle = math.abs(open - close) * 100 / math.abs(high - low) <= engulfingThreshold

bullEngulfing = strategy.opentrades == 0 and trend == 1 and close[1] < open[1] and close > open[1] and not isBoringCandle and not isEngulfingCandle
bearEngulfing = strategy.opentrades == 0 and trend == -1 and close[1] > open[1] and close < open[1] and not isBoringCandle and not isEngulfingCandle

// Calculate Limit Price
limitbull = bullEngulfing ? close + OpenPosisi * syminfo.mintick : na
limitbear = bearEngulfing ? close - OpenPosisi * syminfo.mintick : na

// Calculate Stop Loss
bullishStopLoss = bullEngulfing ? limitbull - stoploss * syminfo.mintick : na
bearishStopLoss = bearEngulfing ? limitbear + stoploss * syminfo.mintick : na

// Calculate Take Profit
bullishTakeProfit = bullEngulfing ? limitbull + takeprofit * syminfo.mintick : na
bearishTakeProfit = bearEngulfing ? limitbear - takeprofit * syminfo.mintick : na


// Alerts for Engulfing Candles (Trigger Immediately)
if bullEngulfing
    alert('Bullish Engulfing Candle Formed!')

if bearEngulfing
    alert('Bearish Engulfing Candle Formed!')

// Plot shapes
plotshape(bullEngulfing, style=shape.triangleup, location=location.abovebar, color=color.new(color.green, 0))
plotshape(bearEngulfing, style=shape.triangledown, location=location.belowbar, color=color.new(color.red, 0))


plot(limitbull, title='Bullish Limit Price', color=color.new(color.purple, 0), style=plot.style_linebr, linewidth=1)
plot(limitbear, title='Bearish Limit Price', color=color.new(color.purple, 0), style=plot.style_linebr, linewidth=1)
plot(bullishStopLoss, title='Bullish Stop Loss', color=color.new(color.red, 0), style=plot.style_linebr, linewidth=1)
plot(bearishStopLoss, title='Bearish Stop Loss', color=color.new(color.red, 0), style=plot.style_linebr, linewidth=1)
plot(bullishTakeProfit, title='Bullish Take Profit', color=color.new(color.blue, 0), style=plot.style_linebr, linewidth=1)
plot(bearishTakeProfit, title='Bearish Take Profit', color=color.new(color.blue, 0), style=plot.style_linebr, linewidth=1)

// Label Stop Loss and Take Profit
label.new(bullEngulfing ? bar_index : na, bullishStopLoss, text='SL: ' + str.tostring(bullishStopLoss), color=color.red, textcolor=color.white, style=label.style_label_up, size=size.tiny)
label.new(bearEngulfing ? bar_index : na, bearishStopLoss, text='SL: ' + str.tostring(bearishStopLoss), color=color.red, textcolor=color.white, style=label.style_label_down, size=size.tiny)
label.new(bullEngulfing ? bar_index : na, bullishTakeProfit, text='TP: ' + str.tostring(bullishTakeProfit), color=color.green, textcolor=color.white, style=label.style_label_down, size=size.tiny)
label.new(bearEngulfing ? bar_index : na, bearishTakeProfit, text='TP: ' + str.tostring(bearishTakeProfit), color=color.green, textcolor=color.white, style=label.style_label_up, size=size.tiny)


// Strategy execution
if bullEngulfing
    strategy.entry('BUY', strategy.long, stop=limitbull)
    strategy.exit('TP/SL', from_entry='BUY', limit=bullishTakeProfit, stop=bullishStopLoss)

if bearEngulfing
    strategy.entry('SELL', strategy.short, stop=limitbear)
    strategy.exit('TP/SL', from_entry='SELL', limit=bearishTakeProfit, stop=bearishStopLoss)