I'm sure there'll be something about this in the forums already, but I didn't find it (searching on end, day, bar etc is difficult)
I have a one minute strategy, calculating on bar close only. I have an instrument (Z) with end of day at 9pm, UK time.
The problem is that the strategy runs constantly, but I need somehow, within a reasonable amount of time, to detect the last tick of the day and do something in the strategy. Currently, the strategy will not call onbarupdate until the first tick of the next bar, which is 8am the following day.
Does anyone have any workarounds or solutions for this issue?
One thing that occured to me was to add another bar series for daily timeframe. At least then I could get the strategy to execute some code.
Related to this, could I have some info about how calling update() works? Can you set the barsinprogress for the call? If so, could I call update from the daily onbarsupdate and set barsinprogress to the minute bars series?
Lastly, I want to try and come up with a solution that doesn't require setting calculateonbarclose to false!
thanks for any ideas
Dave
Comment