How does method startStrategy from IStrategies work?
StephanePaulus
Post subject: How does method startStrategy from IStrategies work?
Post rating: 0
Posted: Thu 30 Aug, 2012, 17:27
User rating: 1
Joined: Tue 01 May, 2012, 22:05 Posts: 17 Location: United Kingdom, London
I want to open a new strategy inside another strategy based upon the outcome of that strategy. So I wrote inside an If statement :
File file = new File("C:/Users/Documents/JForex/Strategies/Files/Strategy1.jfx"); IStrategyListener listener = new IStrategyListener() {public void onStart(long strategyId){} public void onStop(long strategyId){}}; Map paraMap = new HashMap(); paraMap.put("Instrument", selectedInstrument); strategy.startStrategy(file, listener, paraMap, true);
The strategy compiled without errors, but when the method startStrategy is called it throws a nullpointerexception. I think this has something to do with the file.
I could just copy past the whole strategy into the other so it becomes 1 very large one. Does anybody know what I could do?
API Support
Post subject: Re: How does method startStrategy from IStrategies work?