User rating: 0
Joined: Sun 14 Apr, 2019, 13:15 Posts: 3 Location: Poland,
I get active chart instrument with
context.getLastActiveChart().getInstrument();
But if I fresh start JForex platform and run strategy has got error (java.lang.IllegalStateException: Chart is closed). If I first click on chart, strategy starts without error.
I try without success:
currChart = context.getLastActiveChart(); if (currChart.equals(null)) { currChart = context.getChart(Instrument.USDJPY); }
There is important thing to understand : After platform restart you didn't have last active chart entity, because you didn't have any active chart until moment when you will do any action with this tab.