Buona domenica,
chiedo aiuto a Roberto ed ai più esperti😃
Vorrei scrivere un indicatore che disegna in un Timeframe inferiore al daily il livello del massimo della giornata precedente, se questa è stata positiva (Close>Open).
Grazie mille!
defparam drawonlastbaronly = true
a=undefined
if islastbarupdate then
if Dopen(1) < Dclose(1) then
a = Dhigh(1)
drawHline(a)coloured("aqua")style(line,1)
else
a=undefined
endif
endif
return a
Oppure questo:
DEFPARAM DrawOnLastBarOnly = true
Timeframe(Daily,UpdateOnClose)
HH = high
IF close <=open THEN
HH = 0
ENDIF
//
Timeframe(default)
IF IntraDayBarIndex = 0 THEN
Barra = BarIndex
ENDIF
IF HH > 0 THEN
DrawSegment(Barra,HH,Barindex + 3,HH) style(Line,2) coloured("Blue")
ENDIF
RETURN