java.lang.NullPointerException at jforex.swapper.onTick(swapper.java:167) at com.dukascopy.dds2.greed.agent.strategy.tester.a.a(Unknown Source) at com.dukascopy.dds2.greed.agent.strategy.tester.l.run(Unknown Source) at com.dukascopy.dds2.greed.agent.strategy.tester.a.wI(Unknown Source) at com.dukascopy.dds2.greed.actions.StrategyTesterAction.vc(Unknown Source) at com.dukascopy.dds2.greed.actions.StrategyTesterAction.uB(Unknown Source) at com.dukascopy.dds2.greed.actions.c.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
in 167
if (order.getState() == IOrder.State.FILLED)
I can not understand why the error occurs. the tester start working without any error.
API Support
Post subject: Re: java.lang.NullPointerException @ jforex.swapper.onTick
The exception you get is because you are likely to have not instantiated the order object, could you please provide a code fragment where you assign a value to the order object?
coguar
Post subject: Re: java.lang.NullPointerException @ jforex.swapper.onTick
The exception you get is because you are likely to have not instantiated the order object, could you please provide a code fragment where you assign a value to the order object?
i can't use code tag so i attach the java file with all code.
In begin of test, there are no errors, but with time its show this error
And with time my memory used with Jforex is rising very fast.
Attachments:
File comment: code swapper.java [14.36 KiB]
Downloaded 291 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on
this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control
on their content. Anyone accessing this webpage and downloading or otherwise making use of any document,
data or information found on this webpage shall do it on his/her own risks without any recourse against
Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from
the use and/or reliance on any document, data or information found on this webpage.
API Support
Post subject: Re: java.lang.NullPointerException @ jforex.swapper.onTick
We did not manage to reproduce the exception. Please consider inserting in line 167 the null check in order to log values when the order is not among the active orders no more (i.e. the order with such label has been either CANCELED, CLOSED or it did not get created).
if(order == null){ console.getErr().println("The order has not been found! magic="+magic+" inst.name()="+inst.name() + " counter="+counter); }
coguar
Post subject: Re: java.lang.NullPointerException @ jforex.swapper.onTick