attached a modified SampleMaCrossOver2 Strategy.
The strategy's only function is to open a long position on date 8march2010 at 9.30.
I added some more Print statements for easier debugging.
Here my findings:
1. From the Print statements it results that the strategy position is 1. This is how it should be.
2. Also, when placing the strategy on a chart the blue Buy 1 arrow on 8march is present. Hence the strategy knows its position.
3. The Control Center Strategy grid does NOT display the correct strategy position. Here only "-" is shown.
4. NT Print gives: **NT** Syncing account... , Account position="",Strategy position="".
My interpretation:
I am inclined to think there is a bug in NinjaTrader: The Position Column should reflect the strategy position, and it does not do this.
Probably by mistake you have taken the position value returned from Strategy.Account.Positions.FindByInstrument or similar and not the Strategy.Position value to fill the Strategy row Position Column value.
Later for synch'ing you refer again to the Strategy row Position Column value which is already wrong...
Please check again and try with the sample strategy I supplied.
Please get back and report if you can confirm the bug.
2. Point:
I see discrepancies between the field value "historical" and the property "Historical". "Historical" stays true all the time, which is wrong, while "historical" reflects the correct situation.
"historical" is however a NT internal variable and not publicly available.
regards
Andreas

Comment