I have a script that works fine...However if I start it in the middle of a theorical trade it does fine while historical but always cancels all historical orders when turnning into realtime. So, I opted to wait until flat to start a new position, but it never finishes the current position because it automatically cancels the stoporders and the iOrder object becomes null.
I can see through teh output that the script continues running like Historical even being it realtime data, but once it cancels the stop the position never ends...
How can I work this ?
Thanks

Comment