Configurer une target avec condition
Forums › ProRealTime forum Français › Support ProBuilder › Configurer une target avec condition
- This topic has 1 reply, 2 voices, and was last updated 4 years ago by Nicolas.
Tagged: abcd
Viewing 2 posts - 1 through 2 (of 2 total)
-
-
06/18/2020 at 9:10 PM #136519
Bonjour à tous,
j’essaie de retravailler un code créé par un italien afin d’y apporter ma touche perso.
Je souhaiterais que le point D (angle du second triangle de ma pattern), soit le résultat d’une target 1 et d’une target 2 qui correspondraient respectivement à un retracement fibo de BC * 1.272 et BC * 1.618
Une fois ces deux targets trouvées et mon second triangle tracé, je souhaiterais que le code dessine une zone entre ces deux tragets.
Pensez-vous que celà est possible? J’ai essayé plusieurs choses mais rien ne fonctionne…….
Merci d’avance ! 🙂
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284//LmaxBars = 100//LMinBars = 5//Ldistance = 15//------------------------------------------------------------------------------------// Bearish Gartley//------------------------------------------------------------------------------------IF BarIndex = 0 THENLMaxBars = 100LMinBars = 5Ldistance = Ldistance * pipsizeLpointA = highLbarA = BarIndexLpointB = lowLbarB = BarIndexLpointC = 0LbarC = 0LpointD = 0LbarD = 0LpointE = 0LbarE = 0Lcount = 0XLpointA = 0XLbarA = 0XLpointB = 0XLbarB = 0XLpointC = 0XLbarC = 0XLpointD = 0XLbarD = 0XLpointE = 0XLbarE = 0Itarget1 = 0Itarget2 = 0Fibo0=11ENDIF//IF Lcount > LmaxBars THENXLpointA = LpointAXLbarA = LbarAXLpointB = LpointBXLbarB = LbarBXLpointC = LpointCXLbarC = LbarCXLpointD = LpointDXLbarD = LbarDXLpointE = LpointEXLbarE = LbarELpointA = highLbarA = BarIndexLpointB = lowLbarB = BarIndexLpointC = 0LbarC = 0LpointD = 0LbarD = 0LpointE = 0LbarE = 0Lcount = 0ENDIFLcount = Lcount + 1LpointA = max(LpointA,high)IF LpointA > LpointA[1] THENLbarA = BarIndexLcount = 0LpointB = lowLbarB = BarIndexLpointC = 0LbarC = 0LpointD = 0LbarD = 0LpointE = 0LbarE = 0ENDIFIF LpointC = 0 THENLpointB = min(LpointB,low)IF LpointB < LpointB[1] THENLbarB = BarIndexENDIFENDIFirange = high - fibo0LdiffAB = LpointA - LpointBLfibC1 = LdiffAB * 0.61LfibC2 = LdiffAB * 0.62LfibD1 = LpointC - (LfibC1 * 0.382)LfibD2 = LpointC - (LfibC2 * 0.886)Itarget1 = fibo0+irange * 1.272Itarget2 = fibo0+irange * 1.618IF high >= (LpointB + LfibC1) AND high <= (LpointB + LfibC2) THENLpointC = highLbarC = BarIndexIF LpointC < LpointC[1] THENLpointC = LpointC[1]LbarC = LbarC[1]ENDIFELSIF close > (LpointB + LfibC2) THEN// ...altrimenti si riparte daccapo con un nuovo Lpoint A ed un nuovo Lpoint BLpointA = highLbarA = BarIndexLpointB = lowLbarB = BarIndexLpointC = 0LbarC = 0LbarD = 0LpointD = 0LbarE = 0LpointE = 0Lcount = 0ENDIF//// Una volta superato il 161.8 si riparte daccapo//IF close < LfibD2 AND LpointD > 0 THENXLpointA= LpointAXLbarA = LbarAXLpointB= LpointBXLbarB = LbarBXLpointC= LpointCXLbarC = LbarCXLpointD= LpointDXLbarD = LbarDLpointA = highLbarA = BarIndexLpointB = lowLbarB = BarIndexLpointC = 0LbarC = 0LpointD = 0LbarD = 0LpointE = 0LbarE = 0Lcount = 0ENDIFIF close < LfibE1 AND LpointE > 0 THENXLpointA= LpointAXLbarA = LbarAXLpointB= LpointBXLbarB = LbarBXLpointC= LpointCXLbarC = LbarCXLpointD= LpointDXLbarD = LbarDLpointA = highLbarA = BarIndexLpointB = lowLbarB = BarIndexLpointC = 0LbarC = 0LpointD = 0LbarD = 0LpointE = 0LbarE = 0Lcount = 0ENDIFIF LpointC > 0 THENIF LpointD = 0 THENIF close <= LfibD1 AND close >= LfibD2 THENLpointD = closeLbarD = BarIndexELSIF close < LfibD2 THENLpointD = LfibD2LbarD = BarIndexENDIFELSEIF close <= LfibD1 AND close >= LfibD2 THENLpointD = closeIF LpointD < LpointD[1] THENLbarD = BarIndexELSELpointD = LpointD[1]ENDIFIF LpointD > 0 THENIF LpointE = 0 THENIF close <= LfibE1 AND close >= LfibE2 THENLpointE = closeLbarE = BarIndexELSIF close < LfibE2 THENLpointE = LfibE2LbarE = BarIndexENDIFELSEIF close <= LfibE1 AND close >= LfibE2 THENLpointE = closeIF LpointE < LpointE[1] THENLbarE = BarIndexELSELpointE = LpointE[1]ENDIFELSEXLpointA= LpointAXLbarA = LbarAXLpointB= LpointBXLbarB = LbarBXLpointC= LpointCXLbarC = LbarCXLpointD= LpointDXLbarD = LbarDXLpointE= LpointEXlbarE = LbarELpointA = highLbarA = BarIndexLcount = 0LpointB = 0LbarB = 0LpointC = 0LbarC = 0LpointD = 0LbarD = 0LpointE = 0LbarE = 0ENDIFENDIFENDIFENDIFENDIFENDIF// si stampano i punti trovati, ognuno dipendente dal precedente, si stampa A, poi B solo se A è stato stampato, poi C solo se B è stato stampato ed infine D se anche C è stato stampatoIF LpointC > 0 THENIF ((LbarC - LbarA) < LminBars ) THENLpointC = 0x = BarIndex - LbarBFOR i = x DOWNTO 0IF low[i] < LpointB THENLpointB = low[i]LbarB = BarIndex[i]ENDIFNEXTENDIFENDIFIF LpointD > 0 THENIF((LbarC - LbarA) < LminBars ) OR ((LbarD -LbarC) < LminBars ) THENLpointD = 0ENDIFENDIFIF LpointE > 0 THENIF((LbarC - LbarA) < LminBars ) OR ((LbarD -LbarC) < LminBars ) THENLpointE = 0ENDIFENDIF//IF LpointD > 0 THEN//IF ((LbarC - LbarA) < LminBars ) OR ((LbarD - LbarC) < LminBars ) THEN//LpointD = 0//ENDIF//ENDIFIF LpointA > 0 THENIF LpointB > 0 THENIF LpointC > 0 THENIF LpointD > 0 THENIF LpointE > 0 THEN//IF LpointD[1] = 0 THENXLpointA = LpointAXLbarA = LbarAXLpointB = LpointBXLbarB = LbarBXLpointC = LpointCXLbarC = LbarCXLpointD = LpointDXLbarD = LbarDXlpointE = LpointEXLbarE = LbarE//ENDIFDRAWTEXT("X",LbarA,LpointA + Ldistance+10*pointsize,Dialog,Bold,22) coloured(205,0,205,255)DRAWTEXT("A",LbarB,LpointB + Ldistance-10*pointsize,Dialog,Bold,22) coloured(205,0,205,255)DRAWTEXT("B",LbarC,LpointC - Ldistance+10*pointsize,Dialog,Bold,22) coloured(205,0,205,255)DRAWTEXT("C",LbarD,LpointD + Ldistance-10*pointsize,Dialog,Bold,22) coloured(205,0,205,255)DRAWTEXT("D",LbarE,LpointE + Ldistance-10*pointsize,Dialog,Bold,22) coloured(205,0,205,255)DRAWTRIANGLE(LbarA,LpointA,LbarB,LpointB,LbarC,LpointC)coloured(50,205,50,255)DRAWTRIANGLE(LbarC,LpointC,LbarD,LpointC,LbarD,LpointD)coloured(50,205,50,255)ENDIFENDIFENDIFENDIFENDIFIF LpointD = 0 AND XLpointD > 0 THENDRAWTEXT("X",XLbarA,XLpointA - Ldistance+10*pointsize,Dialog,Bold,22) coloured(205,0,205,255)DRAWTEXT("A",XLbarB,XLpointB + Ldistance-10*pointsize,Dialog,Bold,22) coloured(205,0,205,255)DRAWTEXT("B",XLbarC,XLpointC - Ldistance+10*pointsize,Dialog,Bold,22) coloured(205,0,205,255)DRAWTEXT("C",XLbarD,XLpointD + Ldistance-10*pointsize,Dialog,Bold,22) coloured(205,0,205,255)DRAWTEXT("D",XLbarE,XLpointE + Ldistance+10*pointsize,Dialog,Bold,22) coloured(205,0,205,255)DRAWTRIANGLE(XLbarA,XLpointA,XLbarB,XLpointB,XLbarC,XLpointC)coloured(50,205,50,255)DRAWTRIANGLE(XLbarC,XLpointC,XLbarD,XLpointC,XLbarD,XLpointD)coloured(50,205,50,255)ENDIF09/25/2020 at 4:10 PM #145416 -
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
Find exclusive trading pro-tools on
Similar topics: