I use the below on intraday charts to retrieve the current bar time:
var vTime = (getHour()*100)+ getMinute(); // get current time
This expression does not actually return the current time, but rather the start time of the current bar.
This technique doesn't work on a Daily chart because there is only one bar. So you always get the start time of the day.
How would one retrieve the actual current time so it can be compared to a preset time and then make something happen on a Daily chart?
For example
if (vTime > XX) Do Y;
bigtee
var vTime = (getHour()*100)+ getMinute(); // get current time
This expression does not actually return the current time, but rather the start time of the current bar.
This technique doesn't work on a Daily chart because there is only one bar. So you always get the start time of the day.
How would one retrieve the actual current time so it can be compared to a preset time and then make something happen on a Daily chart?
For example
if (vTime > XX) Do Y;
bigtee
Comment