Linea orizzontale e ciclo For
Forums › ProRealTime forum Italiano › Supporto ProBuilder › Linea orizzontale e ciclo For
- This topic has 3 replies, 3 voices, and was last updated 1 year ago by
JS.
Viewing 4 posts - 1 through 4 (of 4 total)
-
-
09/20/2024 at 1:55 PM #237880
Ciao, sto cercando di tracciare delle line orizzontali al verificarsi delle condizioni (vedi script). Funziona solo per una condizione (la prima) e non capisco il perchè.
Allego il codice.
Grazie per l’aiuto
media123456789101112131415161718192021222324252627282930TIMEFRAME(default)TF = GetTimeFrameMM = Average[10](close)CONDS = HIGH and LOW >= MMCONDL = LOW and HIGH <= MMIF CONDS and TF >= 14400 THEN //(>= H4)DRAWARROWDOWN(barindex,high ) COLOURED(255,0,0,255)alto = highif islastbarupdate thenfor i=0 to 100 dodrawsegment(barindex[i],alto[i] ,barindex,alto[i] )coloured("red",100)nextendifENDIFIF CONDL and TF >= 14400 THENDRAWARROWUP(barindex,low ) COLOURED(0,255,0,255)basso = lowif islastbarupdate thenfor i=0 to 100 dodrawsegment(barindex[i],basso[i] ,barindex,basso[i] )coloured("green",100)nextendifENDIFRETURN MM coloured(255,128,192) AS "MM"09/20/2024 at 3:56 PM #23788609/20/2024 at 6:13 PM #23789509/21/2024 at 11:45 AM #237904Ciao,
Può essere vera solo 1 condizione alla volta, CONDS o CONDL
A seconda di quale condizione è attualmente vera, l’indicatore disegnerà le linee rosse o verdi…
Se vuoi vedere tutto, non dovresti usare “IsLastBarUpdate”…
3 users thanked author for this post.
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
