I am fairly new to NinjaTrader.
I am trying to create a Strategy to generate some alerts at the end of the day based on that day's market action.
I have set the data series for the strategy as 'Day' Base Period Type.
However, it is appearing like at the EOD, that day's bar does not close and therefore the code within OnBarUpdate is not executing.
I saw some posts here and have changed my Calculate parameter from OnBarClose to OnEactTick.
But I am not sure if that is helping.
I am thinking of the below mechanism to overcome it.
1. Add another data series of 1 minute inside the strategy
2. Add a check inside OnBarUpdate method that will be executed for 1-minute bar invocations and that determines if the current time of the day is 3:59 PM
3. If so, try to access the day's bar and make the calculations and generate the alerts.
Is the above a feasible solution or is there a better way this could be achieved?
Thanks.
Comment