View Full Version : Basic Question
Jappenzeller
06-06-2007, 08:21 AM
How do I get a strategy to "stop" programmatically? I guess I want a method that basically does the same thing as the stop button in the strategies tab.
Thanks,
Jim
NinjaTrader_Dierk
06-06-2007, 08:32 AM
Sorry, this is not supported at this time.
NinjaTrader_Ray
06-06-2007, 08:37 AM
You could add a "stop" condition check as the first line in OnBarUpdate() method and when the stop condition is true, just return out of the method.
This will not stop the strategy but it will prevent any of your strategy logic from futher execution.
Jappenzeller
06-06-2007, 09:29 AM
That's currently what I'm doing. Thanks for the answer.