Plot stepped Highs and Lows
Posted: Thu Jul 01, 2021 3:44 am
Hi scripters !
I am developing an intraday breakout indicator and I am stuck for a few days.
Using the security function, I am able to plot a Days high and low on lower time frame, but each time the high or the low changes, my script plots a new horizontal line based on the latest high and low, erasing the old one. Due to this I am having back testing issues.
Can somebody help me with plotting current and all previous day's highs and lows as steps and as they have occurred please.
For example,
If subsequent days highs are made at say 10 am, 12 pm, 2 pm, 4 pm,
I need the chart to plot one horizontal line from 10 am to 12 pm ( indicating the high until 12 pm ) then another horizontal line from 12 pm to 2 pm, then another horizontal line from 2 pm to 4 pm, and so on without erasing the previous horizontal lines.
I've tried to explain this to the best of my ability. I hope I have conveyed it clear enough.
This is my first post. Thank you in advance :)
I am developing an intraday breakout indicator and I am stuck for a few days.
Using the security function, I am able to plot a Days high and low on lower time frame, but each time the high or the low changes, my script plots a new horizontal line based on the latest high and low, erasing the old one. Due to this I am having back testing issues.
Can somebody help me with plotting current and all previous day's highs and lows as steps and as they have occurred please.
For example,
If subsequent days highs are made at say 10 am, 12 pm, 2 pm, 4 pm,
I need the chart to plot one horizontal line from 10 am to 12 pm ( indicating the high until 12 pm ) then another horizontal line from 12 pm to 2 pm, then another horizontal line from 2 pm to 4 pm, and so on without erasing the previous horizontal lines.
I've tried to explain this to the best of my ability. I hope I have conveyed it clear enough.
This is my first post. Thank you in advance :)