View Full Version : Exiting and Re-Entering a Strategy
Will you please explain the Strategy logic that takes place if I exit and then re-enter a strategy when connected on-line.
1. Exit: Will current trades be closed?
2. Re-Enter/Re-Start: The strategy seems to process the history but does not execute any orders - correct?
3. Re-Enter/Re-Start: If the History ended with a BUY and then the real-time processing begins will NT skip the next SELL (in real-time) since it relates to the previous BUY (history) which was not executed as it occurred before the real-time session began?
Thanks.
NinjaTrader_Ray
02-02-2007, 09:21 AM
Guym,
1. Ifyou have a strategy running with an open position and you terminate it will leave the position open and optionally cancel any working orders depending on your Tools > Options > Strategies >NinjaScript > Order handling settings.
2. If you restart, the strategy will calculateits current state based on historical data and either:
a) Wait until flat beforeexecuting an live orders or;
b) Immediately submit live orders
Depending on options in Tools > Options > Strategies > NinjaScript > "On starting a real-time strategy"
Any open position calculated by the strategy is not reconciled with your live account so if the strategy is long 1 and your account is flat, you have to then manually open a position to sync the two together. These
3) Depends on the settings above.
Ray
Thanks - this helps a lot.
under Options->Strategies->Ninjascript
does the "Wait until flat before executing live" option mean that the Ninjascript code waits until flat before it starts executing or does it mean that an order generated by the Ninjascript code will be ignored until flat?
NinjaTrader_Ray
02-03-2007, 08:13 AM
It means that the strategy will run against real-time data but think its still historical, historical orders are not processed as live, but still historically. Once the strategy goes flat, then the next generated entry order will go live.
Ray