I have some various stats I have a script I have run on the end of each day, last bar of that particular session template.
I.e. for a RTH session template of NQ, it will run on that last bar that occurs at the end of the session. My problem is that it works for every day except the very last session. So if I run the report over 15 days of data, it will collect the first 14 days, but it won't execute on the very last day, until a new day begins.
Is there a way to get around this? Or is there a way to tell it to run on the very latest bar on the chart?
The piece of code I am using to run at the end of the day is:
if(Bars.LastBarOfSession ) { Do somethign }
Comment