Buongiorno a tutti,
vorrei creare un indicatore che ad ogni inizio di settimana (il lunedì) disegni sul grafico il Massimo ed il Minimo della settimana precedente.
Ho provato con il seguente codice, ma non funziona.
If (DayOfWeek = 1) Then
DailyHigh = Higest[5](Close)
DailyLow = Lowest[5](Close)
EndIf
Return DailyHigh, DailyLow
Grazie a tutti per la collaborazione
Stefano
Ciao, è possibile utilizzare il seguente codice per disegnare la settimana precedente alto e basso sul grafico dei prezzi. (Vedi foto allegata).
//weekly high/low
IF DayOfWeek < DayOfWeek[1] THEN
weekHprevious = myH
weekLprevious = myL
myH = High
myL = Low
ELSE
myH = Max(High, myH)
myL = Min(Low, myL)
ENDIF
weekH = weekHprevious
weekL = weekLprevious
RETURN weekH,weekL