Modification de code pour optimisation visuelle
Forums › ProRealTime forum Français › Support ProBuilder › Modification de code pour optimisation visuelle
- This topic has 10 replies, 3 voices, and was last updated 1 day ago by
Denis Quéva.
-
-
06/11/2025 at 9:53 AM #248170
Bonjour,
J’aimerais simplifier ce code afin d’afficher que les lignes du High et du Low de la session en cours (Asia, London ou New York) pendant la session active uniquement (et non les sessions précédentes) et sans rectangle de remplissage, avec les paramètres horaires suivants (en heure de New York, ET) : Asia : 20h00 – 03h00 London : 03h00 – 09h30 New York : 09h30 – 17h00 ,
Une étiquette discrète pour chaque ligne, comme “HAS”/”LAS” pour Asia, “HL”/”LL” pour London, “HNY”/”LNY” pour NY. Des couleurs distinctes : bleu (Asia), rouge (London), vert (NY).
Je vous remercie d’avance pour votre aide pour ajuster cela!
ICT Killzones and Pivots: Time Zones and Pivots123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310//----------------------------------------------////PRC_ICT Killzones and Pivots//version = 0//10.10.2024//Iván González @ www.prorealcode.com//Sharing ProRealTime knowledge//----------------------------------------------////-----INPUTS-----------------------------------////----------------------------------------------//openAS=020000closeAS=060000openLO=080000closeLO=110000openNYam=153000closeNYam=170000openNYlch=180000closeNYlch=190000openNYpm=193000closeNYpm=220000openNY=openNYamcloseNY=closeNYpmlimitday=180000openTrueDay=060000ShowNylch=1if gettimeframe<=3600 then//----------------------------------------------////-----ASIA Zone--------------------------------////----------------------------------------------//once maxHighAS=highonce minLowAS=lowif opentime>=openAS and opentime<=closeAS thenbarAS=barAS+1if high>=maxHighAS thenmaxHighAS=highelsemaxHighAS=maxHighASendifif low<=minLowAS thenminLowAS=lowelseminLowAS=minLowASendifendifif opentime=closeAS thendrawrectangle(barindex[barAS],minLowAS,barindex,maxHighAS)coloured("blue")fillcolor("blue",30)drawtext("AS.H: #maxHighAS#",barindex[round(barAS/2)],maxHighAS+0.3*tr)drawtext("AS.L: #minLowAS#",barindex[round(barAS/2)],minLowAS-0.3*tr)prevLowAS=minLowASprevHighAS=maxHighASprevidxAS=barindexbarAS=0minLowAS=high*100maxHighAS=0endifif low crosses under prevLowAS thendrawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")prevLowAS=0elsif opentime=limitday and prevLowAS<>0 thendrawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")prevLowAS=0elsif islastbarupdate and prevLowAS<>0 thendrawsegment(previdxAS,prevLowAS,barindex,prevLowAS)coloured("blue")endifif high crosses over prevHighAS thendrawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")prevHighAS=0elsif opentime=limitday and prevHighAS<>0 thendrawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")prevHighAS=0elsif islastbarupdate and prevHighAS<>0 thendrawsegment(previdxAS,prevHighAS,barindex,prevHighAS)coloured("blue")endif//----------------------------------------------////-----London Zone------------------------------////----------------------------------------------//once maxHighLO=highonce minLowLO=lowif opentime>=openLO and opentime<=closeLO thenbarLO=barLO+1if high>=maxHighLO thenmaxHighLO=highelsemaxHighLO=maxHighLOendifif low<=minLowLO thenminLowLO=lowelseminLowLO=minLowLOendifendifif opentime=closeLO thendrawrectangle(barindex[barLO],minLowLO,barindex,maxHighLO)coloured("red")fillcolor("red",30)drawtext("LO.H: #maxHighLO#",barindex[round(barLO/2)],maxHighLO+0.3*tr)drawtext("LO.L: #minLowLO#",barindex[round(barLO/2)],minLowLO-0.3*tr)prevLowLO=minLowLOprevHighLO=maxHighLOprevidxLO=barindexbarLO=0minLowLO=high*100maxHighLO=0endifif low crosses under prevLowLO thendrawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")prevLowLO=0elsif opentime=limitday and prevLowLO<>0 thendrawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")prevLowLO=0elsif islastbarupdate and prevLowLO<>0 thendrawsegment(previdxLO,prevLowLO,barindex,prevLowLO)coloured("red")endifif high crosses over prevHighLO thendrawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")prevHighLO=0elsif opentime=limitday and prevHighLO<>0 thendrawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")prevHighLO=0elsif islastbarupdate and prevHighLO<>0 thendrawsegment(previdxLO,prevHighLO,barindex,prevHighLO)coloured("red")endifif ShowNylch then//----------------------------------------------////-----New York AM------------------------------////----------------------------------------------//once maxHighNYam=highonce minLowNYam=lowif opentime>=openNYam and opentime<=closeNYam thenbarNYam=barNYam+1if high>=maxHighNYam thenmaxHighNYam=highelsemaxHighNYam=maxHighNYamendifif low<=minLowNYam thenminLowNYam=lowelseminLowNYam=minLowNYamendifendifif opentime=closeNYam thendrawrectangle(barindex[barNYam],minLowNYam,barindex,maxHighNYam)coloured("green")fillcolor("green",30)drawtext("NYam.H:#maxHighNYam#",barindex[round(barNYam/2)],maxHighNYam+0.3*tr)drawtext("NYam.L:#minLowNYam#",barindex[round(barNYam/2)],minLowNYam-0.3*tr)prevLowNYam=minLowNYamprevHighNYam=maxHighNYamprevidxNYam=barindexbarNYam=0minLowNYam=high*100maxHighNYam=0endifif low crosses under prevLowNYam thendrawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")prevLowNYam=0elsif opentime=limitday and prevLowNYam<>0 thendrawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")prevLowNYam=0elsif islastbarupdate and prevLowNYam<>0 thendrawsegment(previdxNYam,prevLowNYam,barindex,prevLowNYam)coloured("green")endifif high crosses over prevHighNYam thendrawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")prevHighNYam=0elsif opentime=limitday and prevHighNYam<>0 thendrawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")prevHighNYam=0elsif islastbarupdate and prevHighNYam<>0 thendrawsegment(previdxNYam,prevHighNYam,barindex,prevHighNYam)coloured("green")endif//----------------------------------------------////-----New York lunch Zone----------------------////----------------------------------------------//once maxHighNYlch=highonce minLowNYlch=lowif opentime>=openNYlch and opentime<=closeNYlch thenbarNYlch=barNYlch+1if high>=maxHighNYlch thenmaxHighNYlch=highelsemaxHighNYlch=maxHighNYlchendifif low<=minLowNYlch thenminLowNYlch=lowelseminLowNYlch=minLowNYlchendifendifif opentime=closeNYlch thendrawrectangle(barindex[barNYlch],minLowNYlch,barindex,maxHighNYlch)coloured("yellow")fillcolor("yellow",30)prevLowNYlch=minLowNYlchprevHighNYlch=maxHighNYlchprevidxNYlch=barindexbarNYlch=0minLowNYlch=high*100maxHighNYlch=0endif//----------------------------------------------////-----New York PM -----------------------------////----------------------------------------------//once maxHighNYpm=highonce minLowNYpm=lowif opentime>=openNYpm and opentime<=closeNYpm thenbarNYpm=barNYpm+1if high>=maxHighNYpm thenmaxHighNYpm=highelsemaxHighNYpm=maxHighNYpmendifif low<=minLowNYpm thenminLowNYpm=lowelseminLowNYpm=minLowNYpmendifendifif opentime=closeNYpm thendrawrectangle(barindex[barNYpm],minLowNYpm,barindex,maxHighNYpm)coloured("purple")fillcolor("purple",30)drawtext("NYpm.H:#maxHighNYpm#",barindex[round(barNYpm/2)],maxHighNYpm+0.3*tr)drawtext("NYpm.L:#minLowNYpm#",barindex[round(barNYpm/2)],minLowNYpm-0.3*tr)prevLowNYpm=minLowNYpmprevHighNYpm=maxHighNYpmprevidxNYpm=barindexbarNYpm=0minLowNYpm=high*100maxHighNYpm=0endifif low crosses under prevLowNYpm thendrawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")prevLowNYpm=0elsif opentime=limitday and prevLowNYpm<>0 thendrawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")prevLowNYpm=0elsif islastbarupdate and prevLowNYpm<>0 thendrawsegment(previdxNYpm,prevLowNYpm,barindex,prevLowNYpm)coloured("purple")endifif high crosses over prevHighNYpm thendrawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")prevHighNYpm=0elsif opentime=limitday and prevHighNYpm<>0 thendrawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")prevHighNYpm=0elsif islastbarupdate and prevHighNYpm<>0 thendrawsegment(previdxNYpm,prevHighNYpm,barindex,prevHighNYpm)coloured("purple")endifelseonce maxHighNY=highonce minLowNY=lowif opentime>=openNY and opentime<=closeNY thenbarNY=barNY+1if high>=maxHighNY thenmaxHighNY=highelsemaxHighNY=maxHighNYendifif low<=minLowNY thenminLowNY=lowelseminLowNY=minLowNYendifendifif opentime=closeNY thendrawrectangle(barindex[barNY],minLowNY,barindex,maxHighNY)coloured("purple")fillcolor("purple",30)drawtext("NY.H: #maxHighNY#",barindex[round(barNY/2)],maxHighNY+0.3*tr)drawtext("NY.L: #minLowNY#",barindex[round(barNY/2)],minLowNY-0.3*tr)prevLowNY=minLowNYprevHighNY=maxHighNYprevidxNY=barindexbarNY=0minLowNY=high*100maxHighNY=0endifif low crosses under prevLowNY thendrawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")prevLowNY=0elsif opentime=limitday and prevLowNY<>0 thendrawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")prevLowNY=0elsif islastbarupdate and prevLowNY<>0 thendrawsegment(previdxNY,prevLowNY,barindex,prevLowNY)coloured("purple")endifif high crosses over prevHighNY thendrawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")prevHighNY=0elsif opentime=limitday and prevHighNY<>0 thendrawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")prevHighNY=0elsif islastbarupdate and prevHighNY<>0 thendrawsegment(previdxNY,prevHighNY,barindex,prevHighNY)coloured("purple")endifendif//----------------------------------------------////-----Limit Day--------------------------------////----------------------------------------------//if opentime=openTrueDay thenopenTD=openbarTD=barindexelseif opentime=limitday thendrawvline(barindex)style(dottedline)drawsegment(barTD,openTD,barindex,openTD)style(dottedline1)endifendifelsedrawtext("Change timeframe to 1hr orless",0,0,SansSerif,bold,34)anchor(middle,xshift,yshift)endifreturn06/11/2025 at 12:13 PM #248184Voilà (je l’ai écrit depuis le début) :
12345678910111213141516171819202122232425262728293031323334353637// Time Zones//DEFPARAM DrawOnLastBarOnly = trueONCE ASstart = 020000ONCE ASend = 090000ONCE LOstart = 090000ONCE LOend = 153000ONCE NYstart = 153000ONCE NYend = 230000ONCE SessionHigh = 0ONCE SessionLow = 99999999Offset = highest[100](range) / 4Asia = OpenTime >= ASstart AND OpenTime < ASendLondon = OpenTime >= LOstart AND OpenTime < LOendNY = OpenTime >= NYstart AND OpenTime < NYendIF (OpenTime = ASstart) OR (OpenTime = LOstart) OR (OpenTime = NYstart) THENSessionHigh = highSessionLow = lowBarStart = BarIndexELSESessionHigh = max(SessionHigh,high)SessionLow = min(SessionLow,low)ENDIFIF Asia THENDrawSegment(BarStart,SessionHigh,BarIndex+ 1,SessionHigh) style(line,1) coloured("Blue",255)DrawSegment(BarStart,SessionLow,BarIndex+ 1,SessionLow) style(line,1) coloured("Blue",255)DrawText("HAS:#SessionHigh# LAS:#SessionLow#",BarStart+10,SessionHigh+Offset,Dialog,standard,10) coloured("Blue",255)ELSIF London THENDrawSegment(BarStart,SessionHigh,BarIndex+ 1,SessionHigh) style(line,1) coloured("Red",255)DrawSegment(BarStart,SessionLow,BarIndex+ 1,SessionLow) style(line,1) coloured("Red",255)DrawText("HL:#SessionHigh# LL:#SessionLow#",BarStart+10,SessionHigh+Offset,Dialog,standard,10) coloured("Red",255)ELSIF NY THENDrawSegment(BarStart,SessionHigh,BarIndex+ 1,SessionHigh) style(line,1) coloured("Green",255)DrawSegment(BarStart,SessionLow,BarIndex+ 1,SessionLow) style(line,1) coloured("Green",255)DrawText("HNY:#SessionHigh# LNY:#SessionLow#",BarStart+10,SessionHigh+Offset,Dialog,standard,10) coloured("Green",255)ENDIFRETURN06/12/2025 at 10:56 AM #248210Merci pour le code fourni, il fonctionne bien pour afficher la session en cours (Asia, London ou NY). Par contre, mon objectif est de voir le range High/Low de la session précédente pendant la session actuelle : Pendant London, voir le range de l’Asia, et pendant New York, voir le range de London et de Asia.
le code affiche uniquement la session active, donc je ne vois plus Asia dès que London commence. Est-ce que vous pourriez l’ajuster pour garder visibles les ranges précédents de la journée ?
Merci d’avance 🙏
Bonne journée06/13/2025 at 9:44 AM #248244123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899// Time Zones//DEFPARAM DrawOnLastBarOnly = trueONCE ASstart = 020000ONCE ASend = 090000ONCE LOstart = 090000ONCE LOend = 153000ONCE NYstart = 153000ONCE NYend = 230000// Range de la dernière session ASIA (soit la dernière si terminée, soit celle en cours)IF (OpenTime = ASstart) THENASbarStart = BarIndexENDIFIF (Time = ASend) THENASbarEnd = BarIndexendifif ASbarEnd < ASbarStart then // Si il y a une session en cours, alors la fin est glissanteASlastBar = barindexelseASlastBar = ASbarEnd // Sinon la session est terminée, la fin est figéeendifASbackward = barindex - ASlastBar // Depuis combine de temps la session est-elle terminée ?ASperiod = ASlastBar - ASbarStart // Durée de la sessionif ASperiod > 0 thenASsessionHigh = highest[ASperiod](high[ASbackward]) // Plus haut de la sessionASsessionLow = lowest[ASperiod](low[ASbackward]) // Plus bas de la sessionelseASsessionHigh = highASsessionLow = lowendif// Range de la dernière session LONDON (soit la dernière si terminée, soir en cours)IF (OpenTime = LOstart) THENLObarStart = BarIndexENDIFIF (Time = LOend) THENLObarEnd = BarIndexendifif LObarEnd < LObarStart then // Si il y a une session en cours, alors la fin est glissanteLOlastBar = barindexelseLOlastBar = LObarEnd // Sinon la session est terminée, est figéeendifLObackward = barindex - LOlastBar // Depuis combine de temps la session est-elle terminée ?LOperiod = LOlastBar - LObarStart // Durée de la sessionif LOperiod > 0 thenLOsessionHigh = highest[LOperiod](high[LObackward]) // Plus haut de la sessionLOsessionLow = lowest[LOperiod](low[LObackward]) // Plus bas de la sessionelseLOsessionHigh = highLOsessionLow = lowendif// Range de la dernière session NY (soit la dernière si terminée, soir en cours)IF (OpenTime = NYstart) THENNYbarStart = BarIndexENDIFIF (Time = NYend) THENNYbarEnd = BarIndexendifif NYbarEnd < NYbarStart then // Si il y a une session en cours, alors la fin est glissanteNYlastBar = barindexelseNYlastBar = NYbarEnd // Sinon la session est terminée, est figéeendifNYbackward = barindex - NYlastBar // Depuis combine de temps la session est-elle terminée ?NYperiod = NYlastBar - NYbarStart // Durée de la sessionif NYperiod > 0 thenNYsessionHigh = highest[NYperiod](high[NYbackward]) // Plus haut de la sessionNYsessionLow = lowest[NYperiod](low[NYbackward]) // Plus bas de la sessionelseNYsessionHigh = highNYsessionLow = lowendifIF Asia THENDrawvline(ASbarStart) coloured("Blue",255)Drawvline(ASlastBar) coloured("Blue",255)DrawSegment(ASbarStart,ASsessionHigh,BarIndex+ 1,ASsessionHigh) style(line,1) coloured("Blue",255) anchor(bottom,index,value)DrawSegment(ASbarStart,ASsessionLow,BarIndex+ 1,ASsessionLow) style(line,1) coloured("Blue",255)DrawText("HAS:#ASSessionHigh# LAS:#ASSessionLow#",ASbarStart+10,-30,Dialog,standard,10) coloured("Blue",255) anchor(top,index,yshift)endifIF London THENDrawvline(LObarStart) coloured("Red",255)Drawvline(LOlastBar) coloured("Red",255)DrawSegment(LOBarStart,LOSessionHigh,BarIndex+ 1,LOSessionHigh) style(line,1) coloured("Red",255)DrawSegment(LOBarStart,LOSessionLow,BarIndex+ 1,LOSessionLow) style(line,1) coloured("Red",255)DrawText("HL:#LOSessionHigh# LL:#LOSessionLow#",LOBarStart+10,-30,Dialog,standard,10) coloured("Red",255) anchor(top,index,yshift)endifIF NY THENDrawvline(NYbarStart) coloured("Green",255)Drawvline(NYlastBar) coloured("Green",255)DrawSegment(NYBarStart,NYSessionHigh,BarIndex+ 1,NYSessionHigh) style(line,1) coloured("Green",255)DrawSegment(NYBarStart,NYSessionLow,BarIndex+ 1,NYSessionLow) style(line,1) coloured("Green",255)DrawText("HNY:#NYSessionHigh# LNY:#NYSessionLow#",NYBarStart+10, -30,Dialog,standard,10) coloured("Green",255) anchor(top,index,yshift)ENDIFRETURNEssaie ce code 😉
J’ai ajouté des barres verticales qui délimitent la période de chaque marché (à supprimer éventuellement). Par contre, j’ai prévu des cases à cocher (à ajouter en variables) pour afficher les marchés que tu souhaites voir apparaître.
2 users thanked author for this post.
06/13/2025 at 9:50 AM #248245en ligne 80 “anchor(bottom,index,value)” est inutile
06/13/2025 at 10:11 AM #248248Merci beaucoup, j’ai une erreur au niveau du code : Définir la variable suivante: Asia London , NY , j’ai reglé ca avec GPT , mais j ai que la session actuel de Londre qui s’affiche , je veux aussi voir la session Asie SVP
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106// Time Zones (heures converties en ET)DEFPARAM DrawOnLastBarOnly = trueONCE ASstart = 200000 // 20:00 ET (Asia Start)ONCE ASend = 030000 // 03:00 ET (Asia End)ONCE LOstart = 030000 // 03:00 ET (London Start)ONCE LOend = 093000 // 09:30 ET (London End)ONCE NYstart = 093000 // 09:30 ET (New York Start)ONCE NYend = 160000 // 16:00 ET (New York End)// Définition des sessions activesAsia = (OpenTime >= ASstart OR OpenTime < ASend)London = (OpenTime >= LOstart AND OpenTime < LOend)NY = (OpenTime >= NYstart AND OpenTime < NYend)// -------------------- Session ASIA --------------------IF (OpenTime = ASstart) THENASbarStart = BarIndexENDIFIF (Time = ASend) THENASbarEnd = BarIndexendifif ASbarEnd < ASbarStart thenASlastBar = barindexelseASlastBar = ASbarEndendifASbackward = barindex - ASlastBarASperiod = ASlastBar - ASbarStartif ASperiod > 0 thenASsessionHigh = highest[ASperiod](high[ASbackward])ASsessionLow = lowest[ASperiod](low[ASbackward])elseASsessionHigh = highASsessionLow = lowendif// -------------------- Session LONDON --------------------IF (OpenTime = LOstart) THENLObarStart = BarIndexENDIFIF (Time = LOend) THENLObarEnd = BarIndexendifif LObarEnd < LObarStart thenLOlastBar = barindexelseLOlastBar = LObarEndendifLObackward = barindex - LOlastBarLOperiod = LOlastBar - LObarStartif LOperiod > 0 thenLOsessionHigh = highest[LOperiod](high[LObackward])LOsessionLow = lowest[LOperiod](low[LObackward])elseLOsessionHigh = highLOsessionLow = lowendif// -------------------- Session NEW YORK --------------------IF (OpenTime = NYstart) THENNYbarStart = BarIndexENDIFIF (Time = NYend) THENNYbarEnd = BarIndexendifif NYbarEnd < NYbarStart thenNYlastBar = barindexelseNYlastBar = NYbarEndendifNYbackward = barindex - NYlastBarNYperiod = NYlastBar - NYbarStartif NYperiod > 0 thenNYsessionHigh = highest[NYperiod](high[NYbackward])NYsessionLow = lowest[NYperiod](low[NYbackward])elseNYsessionHigh = highNYsessionLow = lowendif// -------------------- DESSIN --------------------IF Asia THENDrawvline(ASbarStart) coloured("Blue",255)Drawvline(ASlastBar) coloured("Blue",255)DrawSegment(ASbarStart,ASsessionHigh,BarIndex+1,ASsessionHigh) style(line,1) coloured("Blue",255)DrawSegment(ASbarStart,ASsessionLow,BarIndex+1,ASsessionLow) style(line,1) coloured("Blue",255)DrawText("HAS:#ASsessionHigh# LAS:#ASsessionLow#",ASbarStart+10,-30,Dialog,standard,10) coloured("Blue",255) anchor(top,index,yshift)ENDIFIF London THENDrawvline(LObarStart) coloured("Red",255)Drawvline(LOlastBar) coloured("Red",255)DrawSegment(LOBarStart,LOSessionHigh,BarIndex+1,LOSessionHigh) style(line,1) coloured("Red",255)DrawSegment(LOBarStart,LOSessionLow,BarIndex+1,LOSessionLow) style(line,1) coloured("Red",255)DrawText("HL:#LOsessionHigh# LL:#LOsessionLow#",LOBarStart+10,-30,Dialog,standard,10) coloured("Red",255) anchor(top,index,yshift)ENDIFIF NY THENDrawvline(NYbarStart) coloured("Green",255)Drawvline(NYlastBar) coloured("Green",255)DrawSegment(NYBarStart,NYSessionHigh,BarIndex+1,NYSessionHigh) style(line,1) coloured("Green",255)DrawSegment(NYBarStart,NYSessionLow,BarIndex+1,NYSessionLow) style(line,1) coloured("Green",255)DrawText("HNY:#NYsessionHigh# LNY:#NYsessionLow#",NYBarStart+10,-30,Dialog,standard,10) coloured("Green",255) anchor(top,index,yshift)ENDIFRETURN06/13/2025 at 10:18 AM #248249c’est normal car avec ce que tu as ajouté, les marchés n’apparaissent que lorsqu’ils sont ouverts.
// Définition des sessions activesAsia = (OpenTime >= ASstart OR OpenTime < ASend)London = (OpenTime >= LOstart AND OpenTime < LOend)NY = (OpenTime >= NYstart AND OpenTime < NYend)Or comme je précisais dans ma réponde il faut créer les variables en paramètres utilisateur.1 user thanked author for this post.
06/13/2025 at 10:20 AM #248251c’est très simple, ouvre le code et clique sur la clé à côté de “Variables” en haut à gauche.
Puis tu ajoutes ceci
1 user thanked author for this post.
06/13/2025 at 10:45 AM #24825306/13/2025 at 11:15 AM #24825606/13/2025 at 11:29 AM #248257Voir mon dernier message.
-
AuthorPosts
Find exclusive trading pro-tools on