I have added to my scripts as last step timefilter. After working for years now with script coding this drives me crazy. The plotting and the variables referring the time show different as it should be.
I have set "Time[0].ToString()" in onstartup to show what time when enabling the script and its different from the time-axis
And in the code I have in onbarupdate with flag (and I plot the bool in chart to see if true and false).
if(readfile1 == true && ToTime(Time[0]) > 90000 && ToTime(Time[0]) < 100000)
{readfile1 == false
Drawline......
}
if(readfile2 == true && ToTime(Time[0]) > 100000 && ToTime(Time[0]) < 110000)
{readfile2 == false
Drawline......
}
But when enabling both bools are immediately false (to debug I see my drawtext in chart false and the lines are plotted). But it should read only at the time in code.
???
Is there anything to add to have the time of current day only maybe?
Thanks
Tony
Comment