Did you notice if the ticks updating in the JForex client while this occured? Does the problem persist? If it does, could you please check if the following strategy prints the ticks?
package jforex.strategies.indicators;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.TimeZone;
import com.dukascopy.api.*;
public class MACDSignals implements IStrategy {
private IConsole console;
private IIndicators indicators;
private SimpleDateFormat sdf;
@Configurable("Instrument")
public Instrument instrument = Instrument.EURUSD;
@Configurable("perTrigger period step")
private Period perTrigger = Period.ONE_MIN;
@SuppressWarnings("serial")
public void onStart(IContext context) throws JFException {
this.console = context.getConsole();
this.indicators = context.getIndicators();
sdf = new SimpleDateFormat("HH:mm:ss") {{setTimeZone(TimeZone.getTimeZone("GMT"));}};
print("start");
}
public void onAccount(IAccount account) throws JFException {
}
public void onMessage(IMessage message) throws JFException {
}
public void onStop() throws JFException {
}
public void onTick(Instrument instrument, ITick tick) throws JFException {
if (!instrument.equals(this.instrument) )
return;
double[][] res1 = indicators.macd(instrument, perTrigger, OfferSide.BID, IIndicators.AppliedPrice.CLOSE, 12, 26, 9, Filter.NO_FILTER, 2, tick.getTime(), 0);
//print the whole array
print(sdf.format(tick.getTime()) + ": (MACD; MACD signal; MACD hist) " +arrayToString(res1) + "");
}
public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
}
private void print(Object message) {
console.getOut().println(message);
}
public static String arrayToString(double [][] arr){
String str = "";
for (int r=0; r<arr.length; r++) {
for (int c=0; c<arr[r].length; c++) {
str += " " + (new DecimalFormat("0.000000")).format(arr[r][c]);
}
str += "; ";
}
return str;
}
}