Breakout mit kleiner Korrektur
Forums › ProRealTime Deutsch forum › ProOrder Support › Breakout mit kleiner Korrektur
- This topic has 6 replies, 3 voices, and was last updated 1 month ago by
robertogozzi.
-
-
09/10/2025 at 8:11 PM #250661
Hallo,
Ich möchte gern den Ausbruch aus einer Bewegung handeln, aber nur dann, wenn die Korrektur nach der Bewegung kleiner als 30 % der Bewegung war.
Ist das möglich?
Den Bewegungsarm würde ich so definieren:
Der Beginn der Bewegung ist am tiefsten Tief der letzten 3 Kerzen, wenn es keinen tieferen Kurs danach gegeben hat.
Das Ende der Bewegung ist am höchsten Hoch der letzten 3 Kerzen, wenn es keinen höheren Kurs mehr gegeben hat.
Im Bild ist der Indikator zu sehen, der eine Bewegung und die Korrektur anzeigt.
Ein Long-Trade soll eröffnet werden wenn
- Der Ausbruch über das letzte Hoch, soll nur dann gehandelt werden, wenn die Korrektur nicht tiefer als 30 % der Bewegungslänge war.
- Der Trade soll nur eingegangen werden, wenn das letzte Korrekturtief (Kreis Gelb) höher liegt als das Korrekturtief davor (Kreis Blau)
- Nach dem Ausbruch, wird eine Position eröffnet! Im Bild grüner Pfeil
- Der Stop Loss liegt 0,5 % unter dem letzten Korrekturtief (Kreis Gelb)
- Der Take Profit soll so sein, dass das CRV 2:1 ergibt
Es wäre schön wenn das geht…
Vielen Dank
Fals das benötigt wird, hier ist der Code vom Indikator, der den Trend in den Chart macht:
defparam calculateonlastbars=30000
cp = 3once lastpoint = 0
if high[cp] >= highest[2*cp+1](high) then
PEAK = 1
else
PEAK = 0
endifif low[cp] <= lowest[2*cp+1](low) then
TROUGH = -1
else
TROUGH = 0
endifif PEAK = 1 then
TOPy = high[cp]
TOPx = barindex[cp]
endifif TROUGH = -1 then
BOTy = low[cp]
BOTx = barindex[cp]
endifif PEAK>0 and (lastpoint=-1 or lastpoint=0) then
DRAWSEGMENT(lastX,lastY,TOPx,TOPy) COLOURED(127,255,0,1000)
DRAWTEXT(“■”,TOPx,TOPy,Dialog,Bold,15) coloured(200,0,0,255)
lastpoint = 1
lastX = TOPx
lastY = TOPy
endifif TROUGH<0 and (lastpoint=1 or lastpoint=0) then
DRAWSEGMENT(lastX,lastY,BOTx,BOTy) COLOURED(255,0,0,255)
DRAWTEXT(“■”,BOTx,BOTy,Dialog,Bold,15) coloured(0,200,0,255)
lastpoint = -1
lastX = BOTx
lastY = BOTy
endif//TREND ATTEMPT
atr=AverageTrueRange[14](close)
if TOPy > TOPy[1] and topy<>lasttop then
//drawarrowup(barindex,low-atr/2) coloured(0,200,0)
lasttop=topy
trendup = 1
else
trendup = 0
endifRETURN TOPy as “TOPy”, BOTY as “BOTy”, trendup as “trendup”
09/11/2025 at 1:23 PM #250695Ich habe es hier gemacht, indem ich die Tiefstwerte betrachtet und den Höchstwert unter diesen lokalisiert habe. Von dort aus habe ich den maximal zulässigen Rückgang berechnet.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647prd = 3th = 30atr = averagetruerange[14](close)if low > low[prd] and lowest[prd](low) > low[prd] and low[prd] < lowest[prd](low)[prd+1] thenpl1 = pl2pl2 = low[prd]pl1x = pl2xpl2x = barindex[prd]ph1 = highest[max(0,(pl2x-pl1x))](high)[barindex-pl2x]ph1x = 0bars = pl2x-pl1xfor i=prd to prd+bars doif ph1=high[i] thenph1x=barindex[i]breakendifnextdistUp=ph1-pl1distDn=ph1-pl2if pl2>pl1 and (distDn/distUp < th/100) thendrawsegment(ph1x,ph1,barindex,ph1)style(line,2)coloured("red")drawsegment(pl1x,ph1-distUp*th/100,barindex,ph1-distUp*th/100)style(dottedline,2)coloured("red")drawsegment(ph1x,ph1,pl1x,pl1)style(line,1)coloured("orange")drawsegment(ph1x,ph1,pl2x,pl2)style(line,1)coloured("orange")drawtext("(2)",pl2x,pl2-0.5*atr)coloured("blue")drawtext("(1)",pl1x,pl1-0.5*atr)coloured("blue")drawtext("H",ph1x,ph1+0.5*atr)coloured("red")drawpoint(pl1x,pl1,2)coloured("blue")drawpoint(pl1x,pl1,5)coloured("blue",30)drawpoint(pl2x,pl2,2)coloured("blue")drawpoint(pl2x,pl2,5)coloured("blue",30)drawpoint(ph1x,ph1,2)coloured("red")drawpoint(ph1x,ph1,5)coloured("red",30)endifendifreturn09/11/2025 at 4:40 PM #250710Hier ist der Code. Beachten Sie jedoch, dass der Indikator REPAINTING ist, sodass das Signal einige Kerzen später erkannt wird als im Diagramm angegeben.
Tatsächlich ist das Signal korrekt, wird aber einige Kerzen früher im Diagramm angezeigt, sodass die roten und grünen Punkte, die Sie sehen, NICHT die Stelle darstellen, an der das Signal tatsächlich generiert wurde:123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990ONCE HH = 0ONCE LL = 0ONCE HHp = 0ONCE LLp = 0ONCE PC = 0.30 //30%ONCE Gap = 0ONCE Sig = 0//ùIF OnMarket THENSig = 0ENDIF//defparam calculateonlastbars=30000cp = 3once lastpoint = 0if high[cp] >= highest[2*cp+1](high) thenPEAK = 1elsePEAK = 0endifif low[cp] <= lowest[2*cp+1](low) thenTROUGH = -1elseTROUGH = 0endifif PEAK = 1 thenTOPy = high[cp]TOPx = barindex[cp]endifif TROUGH = -1 thenBOTy = low[cp]BOTx = barindex[cp]endifif PEAK>0 and (lastpoint=-1 or lastpoint=0) then//DRAWSEGMENT(lastX,lastY,TOPx,TOPy) COLOURED(127,255,0,1000)//DRAWTEXT("■",TOPx,TOPy,Dialog,Bold,15) coloured(200,0,0,255)HHp = HHHH = TOPyHB = TOPxSig = 0lastpoint = 1lastX = TOPxlastY = TOPyendifif TROUGH<0 and (lastpoint=1 or lastpoint=0) then//DRAWSEGMENT(lastX,lastY,BOTx,BOTy) COLOURED(255,0,0,255)//DRAWTEXT("■",BOTx,BOTy,Dialog,Bold,15) coloured(0,200,0,255)LLp = LLLL = BOTyLB = BOTxlastpoint = -1lastX = BOTxlastY = BOTyendif//TREND ATTEMPTatr=AverageTrueRange[14](close)if TOPy > TOPy[1] and topy<>lasttop then//drawarrowup(barindex,low-atr/2) coloured(0,200,0)lasttop=topytrendup = 1elsetrendup = 0endif//RETURN TOPy as "TOPy", BOTY as "BOTy", trendup as "trendup"IF (HHp <> 0) AND (LLp <> 0) THENIF (HH <> HH[1]) THENGap = HHp - LLSpike = HHp - LLpRatio = Gap * 100 / SpikeIF (Ratio > 0) AND (Ratio < PC) THENSig = 1ENDIFENDIFENDIFIF Not OnMarket AND Sig = 1 THENBUY 1 CONTRACT AT HH STOPSL = HH - LL - (LL * 0.005) //0.5% below the last LLSLprice = HH - SLTP = SL * 2TPprice = HH + TPSET STOP PRICE SLpriceSET TARGET PRICE TPpriceENDIFgraphonprice LL coloured("Brown")GraphOnPrice HH coloured("Black")GraphOnPrice SLprice coloured("Fuchsia")GraphOnPrice TPprice coloured("Cyan")graph Spikegraph Gapgraph Ratio09/12/2025 at 11:31 AM #25074809/12/2025 at 5:23 PM #250762Ich habe einige Fehler bei der Prozentberechnung und der Umsatzart gefunden.
Hier ist der neue Code:123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596ONCE HH = 0ONCE LL = 0ONCE HHp = 0ONCE LLp = 0ONCE PC = 30 //30%ONCE Gap = 0ONCE Sig = 0//ùIF OnMarket THENSig = 0ENDIF//defparam calculateonlastbars=30000cp = 3once lastpoint = 0if high[cp] >= highest[2*cp+1](high) thenPEAK = 1elsePEAK = 0endifif low[cp] <= lowest[2*cp+1](low) thenTROUGH = -1elseTROUGH = 0endifif PEAK = 1 thenTOPy = high[cp]TOPx = barindex[cp]endifif TROUGH = -1 thenBOTy = low[cp]BOTx = barindex[cp]endifif PEAK>0 and (lastpoint=-1 or lastpoint=0) then//DRAWSEGMENT(lastX,lastY,TOPx,TOPy) COLOURED(127,255,0,1000)//DRAWTEXT("■",TOPx,TOPy,Dialog,Bold,15) coloured(200,0,0,255)HHp = HHHH = TOPyHB = TOPxSig = 0lastpoint = 1lastX = TOPxlastY = TOPyendifif TROUGH<0 and (lastpoint=1 or lastpoint=0) then//DRAWSEGMENT(lastX,lastY,BOTx,BOTy) COLOURED(255,0,0,255)//DRAWTEXT("■",BOTx,BOTy,Dialog,Bold,15) coloured(0,200,0,255)LLp = LLLL = BOTyLB = BOTxlastpoint = -1lastX = BOTxlastY = BOTyendif//TREND ATTEMPTatr=AverageTrueRange[14](close)if TOPy > TOPy[1] and topy<>lasttop then//drawarrowup(barindex,low-atr/2) coloured(0,200,0)lasttop=topytrendup = 1elsetrendup = 0endif//RETURN TOPy as "TOPy", BOTY as "BOTy", trendup as "trendup"IF (HHp <> 0) AND (LLp <> 0) THENIF (LL <> LL[1]) THENGap = HH - LLSpike = HH - LLpRatio = Gap * 100 / SpikeIF (Ratio > 0) AND (Ratio < PC) THENSig = 1ENDIFENDIFENDIFIF Not OnMarket AND Sig = 1 THENIF close > HH THENBUY 1 CONTRACT AT HH LIMITELSIF close < HH THENBUY 1 CONTRACT AT HH STOPELSEBUY 1 CONTRACT AT MARKETENDIFSL = HH - LL - (LL * 0.005) //0.5% below the last LLSLprice = HH - SLTP = SL * 2TPprice = HH + TPSET STOP PRICE SLpriceSET TARGET PRICE TPpriceENDIFgraphonprice LL coloured("Brown")GraphOnPrice HH coloured("Black")GraphOnPrice SLprice coloured("Fuchsia")GraphOnPrice TPprice coloured("Cyan")graph Spikegraph Gapgraph Ratio09/13/2025 at 6:56 PM #250792Hallo und Danke
das funktioniert gut!!
Entschuldigung!, mir ist gerade aufgefallen, das ich noch eine Bedingung brauche.
Es soll nur der Ausbruch gehandelt werden wenn das HH mindestens 3 Tage und höchstens 10 Tage her ist?
Vielen Dank
09/15/2025 at 4:35 PM #250873Dies ist die neue Version, die mit Ihrer letzten Anfrage aktualisiert wurde:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104ONCE HH = 0ONCE LL = 0ONCE HHp = 0ONCE LLp = 0ONCE PC = 30 //30%ONCE Gap = 0ONCE Sig = 0//ùIF OnMarket THENSig = 0ENDIF//defparam calculateonlastbars=30000cp = 3once lastpoint = 0if high[cp] >= highest[2*cp+1](high) thenPEAK = 1elsePEAK = 0endifif low[cp] <= lowest[2*cp+1](low) thenTROUGH = -1elseTROUGH = 0endifif PEAK = 1 thenTOPy = high[cp]TOPx = barindex[cp]endifif TROUGH = -1 thenBOTy = low[cp]BOTx = barindex[cp]endifif PEAK>0 and (lastpoint=-1 or lastpoint=0) then//DRAWSEGMENT(lastX,lastY,TOPx,TOPy) COLOURED(127,255,0,1000)//DRAWTEXT("■",TOPx,TOPy,Dialog,Bold,15) coloured(200,0,0,255)HHp = HHHBp = HBHH = TOPyHB = TOPxSig = 0lastpoint = 1lastX = TOPxlastY = TOPyendifif TROUGH<0 and (lastpoint=1 or lastpoint=0) then//DRAWSEGMENT(lastX,lastY,BOTx,BOTy) COLOURED(255,0,0,255)//DRAWTEXT("■",BOTx,BOTy,Dialog,Bold,15) coloured(0,200,0,255)LLp = LLLBp = LBLL = BOTyLB = BOTxlastpoint = -1lastX = BOTxlastY = BOTyendif//TREND ATTEMPTatr=AverageTrueRange[14](close)if TOPy > TOPy[1] and topy<>lasttop then//drawarrowup(barindex,low-atr/2) coloured(0,200,0)lasttop=topytrendup = 1elsetrendup = 0endif//RETURN TOPy as "TOPy", BOTY as "BOTy", trendup as "trendup"IF (HHp <> 0) AND (LLp <> 0) THENIF (LL <> LL[1]) THENGap = HH - LLSpike = HH - LLpRatio = Gap * 100 / SpikeIF (Ratio > 0) AND (Ratio < PC) AND (HB <= Barindex[3]) AND (HB >= Barindex[10]) THENSig = 1ELSESig = 0ENDIFENDIFENDIFIF Not OnMarket AND Sig = 1 THENIF close > HH THENBUY 1 CONTRACT AT HH LIMITELSIF close < HH THENBUY 1 CONTRACT AT HH STOPELSEBUY 1 CONTRACT AT MARKETENDIFSL = HH - LL - (LL * 0.005) //0.5% below the last LLSLprice = HH - SLTP = SL * 2TPprice = HH + TPSET STOP PRICE SLpriceSET TARGET PRICE TPpriceENDIF//graphonprice LL coloured("Brown")//GraphOnPrice HH coloured("Black")//GraphOnPrice SLprice coloured("Fuchsia")//GraphOnPrice TPprice coloured("Cyan")//graph Spike//graph Gap//graph Ratio//graph HBp//graph HB//graph BarIndex//graph Sig -
AuthorPosts
Find exclusive trading pro-tools on 