I want to run a my strategy on EURUSD M15 chart.
I used below code:
@Override
public void onStart(IContext context) throws JFException {
Set subscribedInstruments = new HashSet();
subscribedInstruments.add(Instrument.EURUSD);
context.setSubscribedInstruments(subscribedInstruments);
}
@Override
public void onBar(Instrument instrument, Period period, IBar askBar,
IBar bidBar) throws JFException {
//first line
if (instrument != Instrument.EURUSD || period != Period.FIFTEEN_MINS) return;
}
But this code is not making any trade in history tester.
Also, I see my strategy status as pending.
How can I fix this?