MaxParticipant
Average
Qui di seguito una domanda inviata a ProRealTime :
Buonasera vorrei creare un indicatore che mi individui sul grafico gli swing higt e swing low con una linea orizzontale per ogni swing individuato.
Questi sono i codici esistenti:
Swing higt:
c1=High < High[1]
c2=Close < Open
c3=High[1] > High[2]
Swing low:
c1=Low > Low[1]
c2=Close > Open
c3=Low[1] < Low[2]
E un esempio di risposta :
//Swing high:
c1=High < High[1]
c2=Close < Open
c3=High[1] > High[2]
//Swing low:
c4=Low > Low[1]
c5=Close > Open
c6=Low[1] < Low[2]
if c1 and c2 and c3 then
DRAWSEGMENT(barindex, high, barindex[1], high)
elsif c4 and c5 and c6 then
DRAWSEGMENT(barindex, low, barindex[1], low)
endif
return
Ciao. Return cosa? Se no non funziona… 🙂
L’istruzione RETURN non necessita di argomenti in questo caso perché i risultati vengono tracciati con quelli DRAWSEGMENT alle righe 14 e 16.