Simple and straightforward.
The GetYYYYMMDD() function returns the day within the multi-day chart that TOS is analyzing. For example, plot the following on a 5 day chart:
def RTHopen = if getTime() crosses above RegularTradingStart(getYYYYMMDD()) then open else RTHopen[1];
plot checkOpen = RTHopen;
And the plot will post the open on each of the 5 days.
Is there a way to store (or plot) the open from today ONLY (i.e. day 0) regardless of the number of days in the chart so it is a single horizontal line with the same value?
I was thinking something like:
def currentOpen = if (getYYYYMMDD() == today's date) then open(period = AggregationPeriod.DAY) else currentOpen[1];
plot checkOpen = currentOpen;
Thanks!
The GetYYYYMMDD() function returns the day within the multi-day chart that TOS is analyzing. For example, plot the following on a 5 day chart:
def RTHopen = if getTime() crosses above RegularTradingStart(getYYYYMMDD()) then open else RTHopen[1];
plot checkOpen = RTHopen;
And the plot will post the open on each of the 5 days.
Is there a way to store (or plot) the open from today ONLY (i.e. day 0) regardless of the number of days in the chart so it is a single horizontal line with the same value?
I was thinking something like:
def currentOpen = if (getYYYYMMDD() == today's date) then open(period = AggregationPeriod.DAY) else currentOpen[1];
plot checkOpen = currentOpen;
Thanks!