hi, I’m trying to display multiple segment based on différent timeframe. Here is the code :
timeframe (1h,UPDATEONCLOSE)
SThour=Supertrend[m,p]
timeframe (4h,UPDATEONCLOSE)
ST4h=Supertrend[m,p]
timeframe (daily,UPDATEONCLOSE)
STday=Supertrend[m,p]
timeframe (weekly,UPDATEONCLOSE)
STweek=Supertrend[m,p]
timeframe(15mn,UPDATEONCLOSE)
st = Supertrend[m,p]
drawsegment(barindex[longueur]+3,sthour,barindex[2]+3,sthour) coloured(r1h,v1h,b1h)style(Line,2)
drawtext(“ST 1h”,barindex+3,sthour) coloured(r1h,v1h,b1h)
drawsegment(barindex[longueur]+3,st4h,barindex[2]+3,st4h) coloured(r4h,v4h,b4h)style(Line,2)
drawtext(“ST 4h”,barindex+3,st4h) coloured(r4h,v4h,b4h)
drawsegment(barindex[longueur]+3,stday,barindex[2]+3,stday) coloured(r1d,v1d,b1d)style(Line,2)
drawtext(“ST 1j”,barindex+3,stday) coloured(r1d,v1d,b1d)
drawsegment(barindex[longueur]+3,stweek,barindex[2]+3,stweek) coloured(r1w,v1w,b1w)style(Line,2)
drawtext(“ST 1w”,barindex+3,stweek) coloured(r1w,v1w,b1w)
It works perfectly for “ST 1h” and “ST 4H” but nothing displays for “ST 1J” and “ST 1W”, any idea of the pb ?