Problème niveau 100
Forums › ProRealTime forum Français › Support ProBuilder › Problème niveau 100
- This topic has 4 replies, 3 voices, and was last updated 2 years ago by
Yvan63.
Viewing 5 posts - 1 through 5 (of 5 total)
-
-
06/17/2022 at 9:24 PM #195494
Bonjour,
Ce code fonctionnait bien, je l’ai retiré puis j’ai voulu le remettre et maintenant il m’affiche une ligne à chaque niveau, soit + 1 à chaque fois
au lieu de 100 comme demandé.
Je ne vois pas ce qui cloche, une idée ?123456789IF NOT DID THENNV = 0FOR NV = 0 TO 30000 DOdrawhline(NV)coloured("cyan")NV = NV + 100 - 1NEXTONCE DID = 1ENDIFRETURNMerci
06/20/2022 at 9:10 AM #195600Ce code fonctionne pour moi :
Niveau 1001234567891011121314151617181920212223242526centaine = round(Close/100) * 100//DRAWHLINE (centaine) coloured(0,0,0) STYLE(line,1)lp2 = centaine + 1000//DRAWHLINE (lp2) coloured(0,0,0) STYLE(line,1)lp4 = centaine + 2000//DRAWHLINE (lp4) coloured(0,0,0) STYLE(line,1)lp6 = centaine + 3000//DRAWHLINE (lp6) coloured(0,0,0) STYLE(line,1)lp8 = centaine + 4000//DRAWHLINE (lp8) coloured(0,0,0) STYLE(line,1)lp12 = centaine + 5000//DRAWHLINE (lp12) coloured(0,0,0) STYLE(line,1)lm2 = centaine - 1000//DRAWHLINE (lm2) coloured(0,0,0) STYLE(line,1)lm4 = centaine - 2000//DRAWHLINE (lm4) coloured(0,0,0) STYLE(line,1)lm6 = centaine - 3000//DRAWHLINE (lm6) coloured(0,0,0) STYLE(line,1)lm8 = centaine - 4000//DRAWHLINE (lm8) coloured(0,0,0) STYLE(line,1)lm9 = centaine - 5000//DRAWHLINE (lm9) coloured(0,0,0) STYLE(line,1)lm10 = centaine - 6000//DRAWHLINE (lm10) coloured(0,0,0) STYLE(line,1)1 user thanked author for this post.
06/20/2022 at 1:45 PM #195634Je ne pense pas que ton code ai fonctionnait ? On ne peut pas modifier l’incrément d’une boucle FOR/NEXT, il est toujours de 1. Dans ce cas utiliser une boucle WHILE/WEND en utilisant un incrément de 100, comme ceci :
123456789IF NOT DID THENNV = 0while NV <= 30000 DOdrawhline(NV)coloured("cyan")NV = NV + 100wendONCE DID = 1ENDIFRETURN1 user thanked author for this post.
06/29/2022 at 9:53 PM #19640806/29/2022 at 9:54 PM #196409 -
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)