Salve, ho questo indicatore che calcola il range della prima ora di contrattazione (dalle ore 08:00 alle ore 09:00) sull’indice dax e io lo uso su time frame a 5 minuti.
Vorrei creare un Ts su time frame 5 minuti mi entri in posizione long se dopo le ore 9 e cioe’ dopo che si e’ formato il range della prima ora, la candela mi chiude sopra il max del range creato dall’indicatore, e mi entri short se le candela mi chiude sotto il range.
Le posizioni verranno gestite con trailing stop.
Un grazie a chi mi puo’ aiutare.
Allego indicatore
defparam drawonlastbaronly = false
once upper=0
once lower=0
starttime = 080000
endtime = 090000
If Time = endtime then
upper=highest[12](high)
lower=lowest[12](low)
dif=round(abs((lower-upper)*pipsize*pointvalue))
//bars=barindex
DRAWTEXT("#dif# pips", barindex-6, upper+10,SansSerif,bold, 16)
DRAWARROWDOWN (barindex-6,upper+5)
DRAWARROWup (barindex-6,upper+15)
DRAWTEXT("#upper#", barindex-6, upper,SansSerif,bold, 16)
DRAWTEXT("#lower#", barindex-6, lower,SansSerif,bold, 16)
endif
//if time >=080500 and Time <=090000 then
////backgroundcolor(0,255,255)
//DRAWRECTANGLE(barindex-6,upper,barindex-6,lower) COLOURED(0,255,0)
//endif
if time >=090500 and Time <=220000 then
count=count+1
DRAWsegment(barindex-count,upper,barindex,upper)coloured(0,0,0)
DRAWsegment(barindex-count,lower,barindex,lower)coloured(0,0,0)
else
count=0
endif
if intradaybarindex=0 then
hh = 0
ll = 0
alreadydrawn = 0
endif
if time=starttime then
startbar=barindex
endif
if time=endtime then
endbar=barindex
endif
if time>=starttime and time<=endtime then
if high>hh then
hh = high
endif
if low<ll or ll=0 then
ll = low
endif
endif
if time>endtime and alreadydrawn=0 then
drawrectangle(startbar,hh,endbar,ll) coloured(0,255,255)
alreadydrawn=1
endif
RETURN