I am still a little unclear on which settings I should choose and would appreciate some input.
My settings in Tools --> Options --> Strategies --> Ninjascript are:
On starting a real-time strategy --> immediately submit live working historical orders
On connection loss --> disconnect delay 10 seconds, number of restart attempts 60, restarts within x minutes 60, handling - keep running
Order handling - cancel entry orders when a strategy is disabled is checked. cancel exit orders when a strategy is disabled is not checked.
Sync account position is false.
I periodically disable strategies to change some settings. What I am trying to accomplish is:
1) When I disable to adjust settings and then re-enable, I don't want the strategy jump into an account position with a market order in my live account. Ignore the current strategy position and wait for the next signal., otherwise I chasing a position way too late.
2) If the strategy gets disabled when I have an open account position, I'm left with no exit order at all and fully exposed to the market. My strategy runs full time on a remote server and I don't get a notification. My trailing stop protection is run inside the strategy. If the strategy is disabled with an open account position in my live account then I'm left hanging out there with no protection. I want it to reconnect, re-enable, and get out of a position in the account if the strategy triggered a trailing stop during the time it was disabled. However, I don't want it to disable, re-enable, and then jump into an existing strategy position (effectively "chasing" a trade, getting in way late and taking the loss)
In summary - if disabled, then try like hell to reconnect and re-enable the strategy. exit an account position if the strategy is flat, but don't enter a position if the strategy isn't flat. I basically only want to sync my account if the account has a position but the strategy is flat.
Hope that is making sense, and thanks in advance
m6
Comment