The TimeSpan properties work nicely in the property sheet. But there's one problem: The values are not persisted in the workspace... or they're not restored from it when restarting NinjaTrader.
The steps to reproduce:
1. Import the attached strategy, MACrossOver, that has a TimeSpan property defined called StartMinutesTS ( Name = "Session Start" )
2. Create a new workspace.
3. Open a chart and add the MACrossOver strategy to it.
4. Look at the properties in the Property Sheet. Note the "Session Start" is displayed as 08:50:00. This is the default setting set in OnStateChange() State == State.SetDefaults.
5. Close NinjaTrader and choose Save when prompted.
6. Restart NinjaTrader
7. Edit the MACrossOver strategy to view the "Session Start" property. The value is 00:00:00.
The Store / Restore bug is only when restarting NinjaTrader. It does not occur if you change steps 5 and 6 to
5. Close the workspace and choose Save when prompted
6. Open the workspace again
The same store/restore issue happens with the Strategy Analyzer as well.
I did not try indicators so I don't know if it's also an issue in the Market Analyzer.
It's really a nice feature to have the TimeSpan property working. I hope this can be fixed soon.
Comment