Heiliger Gral für heikin aschi
Forums › ProRealTime Deutsch forum › Generelle Trading-Themen › Heiliger Gral für heikin aschi
-
-
03/30/2025 at 5:38 PM #245427123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960//@version=5strategy(“Heiliger Gral (Heikin Ashi)”, overlay=true)// Auswahl des Timeframes für externe Berechnungentf = input.timeframe(“1D”, title=”Timeframe für Berechnung”) // Standardmäßig 1 Tag// Auswahl: Trading Direction (Long, Short oder Long and Short)tradeDirection = input.string(“Long and Short”, title=”Trading Direction”, options=[“Long”, “Short”, “Long and Short”])// Kopierschutz: Definiere das feste Enddatum für den Backtestint backtest_end_date = timestamp(2035, 2, 14, 0, 0)current_time = time// *** Heikin Ashi für den aktuellen Timeframe ***ha_close_curr = (open + high + low + close) / 4var float ha_open_curr = (open + close) / 2ha_open_curr := (ha_open_curr + ha_close_curr[1]) / 2ha_high_curr = math.max(high, math.max(ha_open_curr, ha_close_curr))ha_low_curr = math.min(low, math.min(ha_open_curr, ha_close_curr))// *** Heikin Ashi-Kerzen aus dem anderen Timeframe berechnen ***ha_close_ext = request.security(syminfo.tickerid, tf, (open + high + low + close) / 4)ha_open_ext_pre = request.security(syminfo.tickerid, tf, (open[1] + close[1]) / 2)ha_open_ext = request.security(syminfo.tickerid, tf, na(ha_open_ext_pre[1]) ? ha_open_ext_pre : (ha_open_ext_pre[1] + ha_close_ext[1]) / 2)ha_high_ext = request.security(syminfo.tickerid, tf, math.max(high, math.max(ha_open_ext, ha_close_ext)))ha_low_ext = request.security(syminfo.tickerid, tf, math.min(low, math.min(ha_open_ext, ha_close_ext)))// **Berechnung von z1 und z2 basierend auf externen Heikin Ashi-Kerzen**a = request.security(syminfo.tickerid, tf, ta.highest(ha_high_ext, 3))b = request.security(syminfo.tickerid, tf, ta.lowest(ha_low_ext, 3))var float z1 = navar float z2 = nafloat z1_plot = nafloat z2_plot = nafloat z3 = naif (current_time <= backtest_end_date)ifha_close_ext[1]>ha_open_ext[1]andha_close_ext<ha_open_extz1:=aifha_close_ext[1]<ha_open_ext[1]andha_close_ext>ha_open_extz2:=b// Berechne z3, wenn z1 und z2 gültig sindifnotna(z1)andnotna(z2)z3:=(z1+z2)/2// Entry-LogikiftradeDirection==”Long”ortradeDirection==”Long and Short”ifha_close_curr>z3strategy.entry(“Long”,strategy.long)iftradeDirection==”Short”ortradeDirection==”Long and Short”ifha_close_curr<z3strategy.entry(“Short”,strategy.short)// Exit-Logik basierend auf z3ifnotna(z3)ifclose>z3strategy.close(“Short”)ifclose<z3strategy.close(“Long”)z1_plot:=z1z2_plot:=z2elsestrategy.close(“Long”)strategy.close(“Short”)label.new(bar_index,high,”No Live Trading”,color=color.red,textcolor=color.white,style=label.style_label_down)// Plottingplot(z1_plot, title=”z1 – Höchster Wert”, color=color.blue, linewidth=2, style=plot.style_stepline)plot(z2_plot, title=”z2 – Tiefster Wert”, color=color.red, linewidth=2, style=plot.style_stepline)plot(z3, title=”z3 – Mitte von z1 und z2″, color=color.gray, linewidth=2, style=plot.style_line)03/30/2025 at 5:47 PM #24542804/09/2025 at 3:18 PM #245761
Hier sind sie:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566tradeDirection=2//------------------------------------------------//// Heikin Ashi candles Current time frame//------------------------------------------------//once haopen=openhaclose=(open+close+high+low)/4if barindex> 0 thenhaopen=(haopen+haclose[1])/2endifhalow=min(low,min(haclose,haopen))hahigh=max(high,max(haclose,haopen))//------------------------------------------------//// Heikin Ashi candles External timeframe//------------------------------------------------//timeframe(daily,updateonclose)once haopenext=openhacloseext=(open+close+high+low)/4if barindex> 0 thenhaopenext=(haopenext+hacloseext[1])/2endifhalowext=min(low,min(hacloseext,haopenext))hahighext=max(high,max(hacloseext,haopenext))a=highest[3](hahighext)b=lowest[3](halowext)timeframe(default)// Z1 and Z2if hacloseext[1]>haopenext[1] and hacloseext<haopenext thenz1=aelsif hacloseext[1]<haopenext[1] and hacloseext>haopenext thenz2=bendif// Z3if z1<>undefined and z2<>undefined thenz3=(z1+z2)/2endif//------------------------------------------------//// Long and Short trades//------------------------------------------------//if not onmarket thenif tradeDirection=1 and haclose>z3 thenbuy 1 contract at marketelsif tradeDirection=-1 and haclose<z3 thensellshort 1 contract at marketelsif tradeDirection=2 and haclose>z3 thenbuy 1 contract at marketelsif tradeDirection=2 and haclose<z3 thensellshort 1 contract at marketendifendifif longonmarket and close<z3 thensell at marketelsif shortonmarket and close>z3 thenexitshort at marketendif//------------------------------------------------//// Graph//------------------------------------------------//graphonprice z1 coloured("blue") as "Z1 max"graphonprice z2 coloured("red") as "Z2 min"graphonprice z3 coloured("orange") as "Z3 med"1 user thanked author for this post.
04/24/2025 at 11:44 AM #246334Danke für Übersetzung für Prorealtime.
Es ist erstaunlich , da eigentlich der Heikin Ashi bereits der Heilige Gral für mich ist. Alleine bei der ersten grünen Kerze Kaufen und bei der ersten roten Kerze zu Shorten hat einen rechnerischen wert von ca 3 -5 Gewinnfaktor. Und das in allen Timeframes auf allen Märkten.
2 Kerzen sind die Looser und 7 Kerzen sind die Gewinner.
Es scheint auch so im Volumentrading zu sein, wenn man hohes Volumen nimmt und die Heikin Kerze nehmen – Dann sollte sich das auch gut rechnen.
Das 50% Retracement hätte halt einen Stop von 1 Kerze ( Mein Heiliger Gral ).
Warum es auf einen “Normalen Chat” eher Bescheiden aussieht kann ich nicht genau sagen.
Aber wenn man nicht an den Heiligen Gral glaubt — dann ist er es auch nicht 😉
04/25/2025 at 2:15 PM #246415//@version=5strategy(“(HTF)”, overlay=true, default_qty_type=strategy.fixed)// Benutzerdefinierter Timeframehtf = input.timeframe(“60”, “Signal Timeframe”)// HTF-Datenhtf_open = request.security(syminfo.tickerid, htf, open)// HTF-Open anzeigenplot(htf_open, title=”HTF Open”, color=color.orange, linewidth=2)// Einstieg bei grüner HTF-Kerzeif close > htf_openstrategy.entry(“Buy”,strategy.long)if close < htf_openstrategy.entry(“Sell”,strategy.short) -
AuthorPosts
Find exclusive trading pro-tools on