Hi,
Strategy won't receive in progress candles for custom periods unless you subscribe to them manually.
Use the following code to subscribe your strategy to custom period in progress candles:
import com.dukascopy.api.listener.IBarFeedListener;
...
public void onStart(IContext context) throws JFException {
...
customTimeframe= Period.createCustomPeriod(Unit.Minute,2);
this.context.subscribeToBarsFeed(
Instrument.EURUSD, customTimeframe, OfferSide.BID, new IBarFeedListener() {
public void onBar(
Instrument instrument,
Period period,
OfferSide offerSide,
IBar bar
) {
}
}
);
}