Hi.
Is there any help i can get to draw a trend line at 6am. lets say using the 1hour chart .. taking 1am to 6am candles — Draw a trend line connecting a valid swing high with those 6candles (highest point on that 6candles) to the most recent swing high of the previous days (previous days high)
is this possible?? please see the attached pic to get an idea!!! please any help appreciated
Yes that’s possible, only for an 1 hour timeframe?
Hi Nicolas,
Thanks for the reply.
Yes this is only for 1hour time frame.. not sure how to get the swing high (highest) of that past 6 candles (1am to 6am) and connect to previous days high!!!
Many thanks
Ro
Hi Nicolas,
please are you able help to achieve this?
I think it should works like the way you want. I only plot the lines for the current day, otherwise the chart would be filled with plenty of lines of previous days… since we can’t erase what’s already plotted.
Arrow = 0
Ncandles = 5
Nside = (Ncandles - 1) / 2
ctime = time>010000 and time<=060000 and date=today
hh=max(high,hh)
if hh<>hh[1] then
highbar=barindex
endif
if intradaybarindex=0 then
hh=0
prevhighbar=highbar
drawvline(barindex) coloured(255,0,0)
endif
if ctime then
IF high[Nside] >= highest[Ncandles](high) THEN
Fup = high[Nside]
FupBar = barindex[Nside]
Arrow = -1
ENDIF
IF Arrow = -1 THEN
DRAWtext("o",barindex[2],high[2]+Averagetruerange[5]/3)coloured(255,0,0)
drawline(prevhighbar,dhigh(1),FupBar,Fup)
ENDIF
endif
return
Hi nicolas,
Thanks very much for the reply,
how can i change this to 1 hour time frame? when its on the one hour only the vertical lines appear? but not the trend line?
Because no swing high had been detected today on the active instrument between the schedules (from 1AM to 6AM).
ahh.. got it!!! thanks for the help nicolas!
Hi,
I have been trying to find an example that I could use to create a downward and upward trend line based on the highest and lowest bar respectively that includes 3 bars. In otherwords only draw the line if there are 3 points that can be derived. I want to make this work across all the major time frames. I have tried a few examples but I haven’t been able to make it work. The example that was provided in this blog is a good one, only it hits just 2 high points.
Thank you in advance.
Toby