Hello
thank you for advice. I know about this option.. I can create try catch block arround the code and invoke stop() method in catch.
But I still dont understand why the strategy is stopped automaticaly when there is exception thrown from the strategy code
and why is the strategy not stopped automaticaly when there is JFException thrown by my custom method defined in my custom library used inside the strategy code.
Imagine I have my custom library and in this library is class Test with following method
public void nothing() throws JFException {
throw new JFException("hello");
}
and then in strategy code I will write something like this:
public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
Test.nothing();
}
It will not interupt the strategy. And thats the problem. It should interupt the strategy.
I dont want to write try catch block arround the code and call the stop() method.
Thank you for your response