I got the code to close open positions at the session end.
Can you provide an example of:
"You can continue scaling in with new entries in the same direction if you would like. With the unmanaged approach you can submit new orders without the position being closed or previous orders cancelled.
If you want to exit the position, call SubmitOrderUnmanaged() with a market order in the opposite direction of the position. (For example if the position is Long 5, submit a sell market order with a quantity of 5)."
Would I also need to create opposing Target and Stop-Loss child orders in OnExecutionUpdate()?

Comment