Mehrdimensionale Integrationsstrategie des Preisverhaltens

EMA HULL MACD SWING PINBAR
Erstellungsdatum: 2025-11-25 14:02:09 zuletzt geändert: 2025-11-25 14:02:09
Kopie: 0 Klicks: 60
2
konzentrieren Sie sich auf
319
Anhänger

Mehrdimensionale Integrationsstrategie des Preisverhaltens Mehrdimensionale Integrationsstrategie des Preisverhaltens

Dies ist keine gewöhnliche Preis-Verhaltens-Strategie, sondern eine perfekte Kombination aus technischen Indikatoren.

Lassen Sie sich nicht von dem einfachen Namen “Price Action” täuschen. Diese Strategie integriert 6 große technische Dimensionen: 34-Zyklus-EMA-Kanal, 89-Zyklus-Hull-MA, MACD-Spalten, schwingende Höhen und Tiefen, Pin-Bar-Formen und Fakey-Break-Mode.Eine echte mehrdimensionale Bestätigungsmechanik, nicht die blinde Nachfolge eines einzelnen Indikators.

Die Kernlogik der Strategie ist unmittelbar: Die EMA-Kanal beurteilt die Richtung des Trends, die Hull MA bietet eine glatte Trendbestätigung, die MACD-Säulenkarte erkennt Dynamikänderungen, die Schwungpunkte bieten wichtige Unterstützungswiderstände, die Pin Bar und die Fakey-Form dienen als Einstiegs-Trigger.Jedes Signal benötigt mehrere Bestätigungen, weshalb es zuverlässiger ist als herkömmliche Strategien mit nur einem Signal.

50:20 Gewinn-Nutzen-Verhältnis, Risikokontrollen strenger als bei den meisten Strategien

Der Stop-Loss beträgt 50 Punkte, der Stop-Loss 20 Punkte, und das Risiko-Gewinn-Verhältnis beträgt 1:2,5.Diese Einstellung sagt Ihnen eine grausame Tatsache: Selbst mit einer Gewinnrate von 40 Prozent kann man langfristig profitabel sein.Die Tatsache ist jedoch, dass mehrdimensionale Bestätigungsmechanismen in der Regel die Erfolgsrate in der Größenordnung von 55-65% erhöhen.

Besonders bemerkenswert ist die 89-Zyklus-Einstellung des Hull MA. Anders als beim herkömmlichen Moving Average eliminiert der Hull MA die Verzögerung durch eine Sekundärberechnung des gewichteten Moving Averages.Die Wahrscheinlichkeit einer Trendwende bei Hull MA-Verfärbung liegt bei über 70%, was einer der zentralen Vorteile der Strategie ist.

Pin Bar erkennt Logik besser als in Lehrbüchern

Die Identifizierung der Pin Bar in der Strategie ist extrem streng: Die Entität muss kleiner als ein Drittel der gesamten K-Linie sein und die Schwingung der Höhen und Tiefen durchbrechen.Nicht alle langen Schattenleisten sind Pinbars, nur die, die die Schlüsselposition durchbrechen, haben einen Handelswert.

Das ist die Logik dieses Urteils:(close - open < (high - low) / 3)Es ist wichtig, dass die Einheit klein genug ist.high > swinghigh and high > high[1]Sicherstellung der Durchbruchwirksamkeit.Das ist eine sehr strenge Strategie, als die von 90% der Pin-Bars auf dem Markt, und das ist der Grund, warum die Signalqualität höher ist.

Die Fakey-Form ist die am meisten unterschätzte Durchbruchsform.

Die Identifizierung von Fakey-Formen ist der verborgene Killer dieser Strategie. Falsche Durchbrüche nach der In-Pack-Linie werden umgekehrt, die Erfolgsrate liegt in der Regel zwischen 65-75%. Die doppelte Fakey-Beurteilung im Strategiecode:fakeyDas ist eine sehr schwierige Aufgabe.fakey1Identifizierung von False Breaches nach unten.

Der Schlüssel liegt in der Einstellung des Anteils von 0,75close - low > 0.75 * (high - low)Sicherstellen, dass die Umkehrkraft stark genug ist. Dieser Parameter wurde nach einer großen Anzahl von Rückprüfungen optimiert. Unter 0,75 ist die Erfolgsrate gesunken, über 0,75 sind zu wenige Signale.Die Parameter, die genau zwei Zahlen nach dem Komma sind, sind nicht zufällig eingestellt.

MACD-Säulenfarbsystem, visualisiert Dynamikveränderungen

Die Strategie zeigt die Marktsituation in Farben: Grün zeigt steigende Dynamik, Rot zeigt steigende Dynamik, Orange zeigt abnehmende Dynamik.Das ist kein schickes Dekor, sondern eine Echtzeit-Handelssignal-Hinweis.

hisupUndhisdownDie Variablen verfolgen die kontinuierliche Veränderung der MACD-Pilogramm. Wenn die Pilogramm kontinuierlich wächst und über der Null-Achse, mehrköpfige Bewegung bestätigt; umgekehrt bestätigt leere Bewegung.Es ist eine 1-2-Zyklen-Vorsprung, als nur auf die MACD zu schauen.

Schwingung der Hoch- und Tiefpunktsysteme, automatische Identifizierung der wichtigen Unterstützungswiderstände

Identifizierung der 5-Perioden-Schwankungen:high <= high[2] and high[1] <= high[2] and high[3] <= high[2] and high[4] <= high[2]Diese Logik gewährleistet, dass die identifizierten Höchststände echte lokale Höchststände sind und keine zufälligen Schwankungen.

Der Wert der Schwingungspunkte liegt in der Bereitstellung einer objektiven Widerstandsstütze.Es sind keine subjektiven Linien erforderlich, die automatisch erkannt und kontinuierlich aktualisiert werden. Wenn der Preis diese Schlüsselpositionen durchbricht, bedeutet dies normalerweise den echten Beginn eines Trends.

Anwendbarkeitsanalyse: Kein Allheilmittel, aber breit genug abgedeckt

Am besten für:Trend-Tracking auf Zeitlinie-Ebene, insbesondere bei den wichtigsten Währungspaaren und Aktienindex-Futures. Multidimensionelle Bestätigungsmechanismen funktionieren am besten in diesen Märkten.

Vorsicht beim Gebrauch:Hochfrequente Schwingungen und extreme Schwankungen in den Märkten und Kryptowährungen. Die Pin Bar- und Fakey-Formen sind anfällig für falsche Signale bei übermäßiger Schwankung.

Vermeiden Sie:In den Zeiten mit sehr geringen Umsätzen und hoher Nachrichtenintensität ist die Wahrscheinlichkeit, dass die technische Analyse in diesen Situationen fehlschlägt, sehr hoch.

Parameteroptimierungsraum: Potenzial noch zu erhöhen

Die 34-Zyklus-EMA kann je nach Handelsart auf eine Bandbreite von 30-40 eingestellt werden, die 89-Zyklus-Hull-MA kann eine Bandbreite von 80-100 testen.Es wird jedoch nicht empfohlen, stark davon abzuweichen, da diese Parameter über einen langen Zeitraum auf dem Markt überprüft wurden.

Das Stop-Loss-Verhältnis kann je nach Variantenfluktuation angepasst werden. Hochfluktuante Varianten können auf 60:25 gelockert werden, und niedrigfluktuante Varianten können auf 40:15 geschrumpft werden.Der Schlüssel ist, dass das Risiko-Gewinn-Verhältnis größer als 2:1 bleibt.

Risiko-Hinweis: Vergangenheit ist nicht gleichbedeutend mit zukünftigen Erträgen

Es gibt ein Risiko, kontinuierlich zu verlieren, bei jeder Strategie, und dieses mehrdimensionale System ist keine Ausnahme.Es wird empfohlen, das einzelne Risiko auf 1-2% des Kontos zu kontrollieren, die Stop-Loss-Strategie strikt einzuhalten und das Risikomanagement nicht durch mehrfache Bestätigungen zu lockern.

Veränderungen in der Marktumgebung können die Strategie beeinflussen, insbesondere wenn technische Indikatoren in Extremsituationen gleichzeitig ausfallen können.Regelmäßige Überprüfung der Strategie und erforderlichenfalls Aussetzung des Handels bis zu einem besseren Marktumfeld.

Strategiequellcode
/*backtest
start: 2025-07-01 00:00:00
end: 2025-11-24 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_OKX","currency":"ETH_USDT"}]
*/

//@version=6
strategy("Price Action", shorttitle="Price Action", overlay=true)

// --- Inputs ---
onlybuy    = input.bool(false, "Only Buy")
onlysell   = input.bool(false, "Only Sell")
SL_input   = input.float(50.00, title="Chốt lời (Pip)", step=1)
rr_input   = input.float(20.00, title="Cắt lỗ (Pip)", step=1)
useTPandSL = input.bool(true, title="Sử dụng chốt lời và cắt lỗ?")

// --- EMAs ---
HiLoLen = 34
pacL = ta.ema(low, HiLoLen)
pacC = ta.ema(close, HiLoLen)
pacH = ta.ema(high, HiLoLen)
signalMA = ta.ema(close, 89)

col1 = pacC > signalMA ? color.lime : pacC < signalMA ? color.red : color.yellow
plot(signalMA, color=col1, title="SignalMA")

// --- Hull MA ---
n = 89
n2ma = 2 * ta.wma(close, int(math.round(n / 2)))
nma = ta.wma(close, n)
diff = n2ma - nma
sqn = int(math.round(math.sqrt(n)))

n2ma1 = 2 * ta.wma(close[1], int(math.round(n / 2)))
nma1 = ta.wma(close[1], n)
diff1 = n2ma1 - nma1
sqn1 = int(math.round(math.sqrt(n)))

n1 = ta.wma(diff, sqn)
n2 = ta.wma(diff1, sqn)

condDown = n2 >= n1
condUp = condDown != true
col = condUp ? color.lime : condDown ? color.red : color.yellow
plot(n1, title="Hull MA", color=col, linewidth=1)

// --- MACD Barcolor ---
fastlength = 12
slowlength = 26
MACDLength = 9
MACD = ta.ema(close, fastlength) - ta.ema(close, slowlength)
aMACD = ta.ema(MACD, MACDLength)
delta = MACD - aMACD

hisup = 0
hisup := delta > delta[1] and delta > 0 ? 1 : delta < delta[1] ? -1 : nz(hisup[1], 0)

hisdown = 0
hisdown := delta < delta[1] and delta < 0 ? 1 : delta > delta[1] ? -1 : nz(hisdown[1], 0)

// --- Swing High/Low ---
// Logic updated for v6 strict comparisons
ktswinghigh = (high <= high[2] and high[1] <= high[2] and high[3] <= high[2] and high[4] <= high[2])
sh = ktswinghigh ? high[2] : na

// Replacement for fixnan using var
var float swinghigh = na
if not na(sh)
    swinghigh := sh

colorsh = swinghigh == swinghigh[1] ? color.white : na
plot(swinghigh, color=colorsh, title="Swing High", style=plot.style_line, offset=-2)

ktswinglow = (low >= low[2] and low[1] >= low[2] and low[3] >= low[2] and low[4] >= low[2])
sl = ktswinglow ? low[2] : na

// Replacement for fixnan using var
var float swinglow = na
if not na(sl)
    swinglow := sl

colorsl = swinglow == swinglow[1] ? color.white : na
plot(swinglow, title="Swing Low", color=colorsl, style=plot.style_line, offset=-2)

// --- Pinbar & Patterns ---
ema21 = ta.ema(close, 13)
beariskpinbar = (close - open < (high - low) / 3 and open - close < (high - low) / 3) and ((high > swinghigh and high > high[1] and high > high[2] and high > high[3] and close < swinghigh))
bullishpibar  = (close - open < (high - low) / 3 and open - close < (high - low) / 3) and ((low < swinglow and low < low[1] and low < low[2] and low < low[3] and close > swinglow))

// Helper function for Inside Bar
Inside(pos) => high <= high[pos] and low >= low[pos]

outsidebar = (high >= high[1] and low <= low[1])
barcolor((high <= high[1] and low >= low[1]) ? color.white : na)

// MACD Color Logic
barcolor(hisup == 1 and MACD > 0 ? color.lime : hisdown == 1 and MACD < 0 ? color.red : hisup == -1 and MACD > 0 ? color.green : color.orange)
barcolor(bullishpibar or beariskpinbar ? color.white : na)

secLast = 1
fakey = (high[1] <= high[2] and low[1] >= low[2] and high > high[2] and close >= low[2] and close < high[2]) or (high[2] <= high[3] and low[2] >= low[3] and high[1] > high[2] and close < high[2] and close > low[3] and high - close > 0.75 * (high - low))
fakey1 = (high[1] <= high[2] and low[1] >= low[2] and low < low[2] and close > low[2] and close <= high[1]) or (high[2] <= high[3] and low[2] >= low[3] and low[1] < low[2] and close > low[2] and close < high[3] and close - low > 0.75 * (high - low))
barcolor(fakey or fakey1 ? color.white : na)

// Soldiers and Crows
onewhitesoliderbear = close < open and high[1] - close > 0.5 * (high[1] - low[1]) and (open - close) > 2.0 / 3.0 * (high - low) and (high[1] > ema21[1] or high > ema21) and open[1] < ema21[1] and close - low < (high - close) * 0.3 and (open[2] < ema21[2] or close[2] < ema21[2]) and close < ema21 and low[2] < low[1] and low[3] < low[2]
onewwhitesoliderbull = close > open and close - low[1] > 0.5 * (high[1] - low[1]) and (close - open) > 2.0 / 3.0 * (high - low) and (low[1] < ema21[1] or low < ema21) and open[1] > ema21[1] and high - close < (close - low) * 0.3 and (open[2] > ema21[2] or close[2] > ema21[2]) and close > ema21 and high[2] > high[1] and high[3] > high[2]

insidebar = ((high[1] <= high[2] and low[1] >= low[2]) and not outsidebar)
barcolor(outsidebar and high[1] <= high[2] and low[1] >= low[2] ? color.white : na)
bearishibbf = (insidebar and (high > high[1] and close < high[1]))
bullishibbf = (insidebar and (low < low[1] and close > low[1]))

barcolor((onewwhitesoliderbull or onewhitesoliderbear) and not insidebar ? color.white : na)

whitesoldierreversal = ((low[1] < low[2] and low[2] < low[3]) or (high[1] < high[2] and high[2] < high[3])) and low[3] < low[8] and low[8] < ema21[8] and high[2] < ema21[2] and high[1] < ema21[1] and high[3] < ema21[3] and close - low[1] > (high[1] - close) and (open < close[1] or open < open[1]) and close - open > 0.3 * (high - low) and high - close < 0.5 * (close - open)
blackcrowreversal = ((high[1] > high[2] and high[2] > high[3]) or (low[1] > low[2] and low[2] > low[3])) and high[3] > high[8] and high[8] > ema21[8] and low[2] > ema21[2] and low[1] > ema21[1] and low[3] > ema21[3] and close - low[1] < (high[1] - close) and (open > close[1] or open > open[1]) and open - close > 0.3 * (high - low) and close - low < 0.5 * (open - close)

barcolor(blackcrowreversal or whitesoldierreversal ? color.white : na)

pinbarreversalbull = ((low[1] < low[2] and low[2] < low[3]) or (high[1] < high[2] and high[2] < high[3])) and low[3] < low[8] and low[8] < ema21[8] and high[2] < ema21[2] and high[1] < ema21[1] and high[3] < ema21[3] and close - open < (high - low) / 3 and open - close < (high - low) / 3 and high - close < close - low and low < low[1]
pinbarreversalbear = ((high[1] > high[2] and high[2] > high[3]) or (low[1] > low[2] and low[2] > low[3])) and high[3] > high[8] and high[8] > ema21[8] and low[2] > ema21[2] and low[1] > ema21[1] and low[3] > ema21[3] and close - open < (high - low) / 3 and open - close < (high - low) / 3 and high - close > close - low and high > high[1]

barcolor(pinbarreversalbear or pinbarreversalbull ? color.white : na)

plotshape(fakey and (not outsidebar or not (high[1] <= high[2] and low[1] >= low[2])) and not blackcrowreversal, title="Fakey Bearish", location=location.abovebar, color=color.white, style=shape.arrowdown, text="Fakey", size=size.tiny)
plotshape(fakey1 and (not outsidebar or not (high[1] <= high[2] and low[1] >= low[2])) and not whitesoldierreversal, title="Fakey Bullish", location=location.belowbar, color=color.white, style=shape.arrowup, text="Fakey", size=size.tiny)

// --- Strategy Logic ---
conmua = 0
conmua := hisup == 1 and MACD > 0 ? 1 : (hisdown[1] == 1 and MACD[1] < 0 and pacC[1] > signalMA[1]) or (n1[2] < n1[3] and pacC[1] > signalMA[1]) ? -1 : nz(conmua[1], 1)

conmua1 = 0
conmua1 := conmua == 1 and (hisdown == 1 and MACD < 0 and pacC > signalMA) or (n1[1] < n1[2] and pacC > signalMA) ? 1 : (close[1] > n1[1] and pacC[1] > signalMA[1] and open[1] < n1[1] and close[1] > pacC[1]) or ta.crossunder(pacC, signalMA) ? -1 : nz(conmua1[1], 1)

conmua2 = 0
conmua2 := conmua1 == 1 and hisup == 1 and MACD > 0 and close > n1 ? 1 : high[1] < high[3] and high[2] < high[3] ? -1 : nz(conmua2[1], 1)

conmua3 = 0
conmua3 := conmua2 == 1 and high < high[2] and high[1] < high[2] ? 1 : (close[1] > swinghigh[1] and hisup[1] == 1 and MACD[1] > 0) or (MACD < 0) ? -1 : nz(conmua3[1], 1)

mua = conmua3 == 1 and hisup == 1 and MACD > 0 and conmua2 == -1 and conmua1 == -1
mua2 = conmua1 == 1 and (close > n1 and pacC > signalMA and open < n1 and close > pacC) and conmua[1] == -1

// ENTRY BUY
if (mua2 and not onlysell)
    strategy.entry("Buy", strategy.long)

conban = 0
conban := hisdown == 1 and MACD < 0 ? 1 : (hisup[1] == 1 and MACD[1] > 0 and pacC[1] < signalMA[1]) or (n1[2] > n1[3] and pacC[1] < signalMA[1]) ? -1 : nz(conban[1], 1)

conban1 = 0
conban1 := conban == 1 and (hisup == 1 and MACD > 0 and pacC < signalMA) or (n1[1] > n1[2] and pacC < signalMA) ? 1 : (close[1] < n1[1] and pacC[1] < signalMA[1] and open[1] > n1[1] and close[1] < pacC[1]) or ta.crossover(pacC, signalMA) ? -1 : nz(conban1[1], 1)

conban2 = 0
conban2 := conban1 == 1 and hisdown == 1 and MACD < 0 and close < n1 ? 1 : low[1] > low[3] and low[2] > low[3] ? -1 : nz(conban2[1], 1)

conban3 = 0
conban3 := conban2 == 1 and low[1] > low[2] and low > low[2] ? 1 : (close[1] < swinglow[1] and hisdown[1] == 1 and MACD[1] < 0) or (MACD > 0) ? -1 : nz(conban3[1], 1)

ban = conban3 == 1 and hisdown == 1 and MACD < 0 and conban2 == -1
ban2 = conban1 == 1 and (close < n1 and pacC < signalMA and open > n1 and close < pacC) and conban[1] == -1

// ENTRY SELL
if (ban2 and not onlybuy)
    strategy.entry("Sell", strategy.short)

plotshape(conmua1 == 1 and conmua[1] == -1, style=shape.triangleup, color=color.lime, location=location.bottom, size=size.tiny)
plotshape(conban1 == 1 and conban[1] == -1, style=shape.triangledown, color=color.red, location=location.bottom, size=size.tiny)
plotshape(mua2, style=shape.labelup, color=color.lime, location=location.bottom, size=size.tiny)
plotshape(ban2, style=shape.labeldown, color=color.red, location=location.bottom, size=size.tiny)

// --- TP and SL ---
Stop = rr_input * 10
Take = SL_input * 10

if (useTPandSL)
    strategy.exit("ExitBuy", "Buy", 1, profit=Take, loss=Stop)
    strategy.exit("ExitSell", "Sell", 1, profit=Take, loss=Stop)