My strategy uses OnOrderUpdate extensively, it also handles closing its positions during reversal signals. (I have issue with NT handling the closing, as it might create additional positions)
Here is the issue I am facing:
1. Strategy are in 3 shorts, say Short2Q1, Short4Q1 and Short7Q1
2. Strategy gets Go Long signal, since we still have three shorts strategy issue closing the shorts, issuing 3 ExitShort as follows:
ExitShort(CloseSh1,Short2Q1)
ExitShort(CloseSh2,Short4Q1)
ExitShort(CloseSh3,Short7Q1)
3. Two of the positions, Short2Q1 and Short4Q1 hit TrailStop first. So when CloseSh1 & CloseSh2 is filled, strategy created LongPositions: CloseSh1 and CloseSh2
4. CloseSh3 is filled, strategy remove Short7Q1 position.
5. NT issues StopLoss and ProfitTarget for CloseSh2, and instead of for CloseSh1 it issues StopLoss and ProfitTarget for CloseSh3! My table has LongPosition CloseSh1, but NT has LongPosition CloseSh3!
6, Strategy prints out performance on the three trades from NT database, NT pairs CloseSh1 as the exit for Short7Q1 position.
7. Strategy crash reporting on calling OnOrderUpdate "Object reference not set to an instance of an object". This happen when profit target of CloseSh3 is hit. My table has CloseSh1 not CloseSh3.
My nice codes now gets really broken because of this.
Why does NT not follow the FromEntrySignals?
What should I do? Abandoning my tables is unthinkable.
Thanks.
Regards.
Edward K.

Comment