Hi,
Have a look here first:
viewtopic.php?f=9&t=24189If you test using Tick on Close, you could receive undesired ticks from other instruments. For example, you get onBar tick for USDJPY at moment X and you try log the EURUSD macd values; I suppose you use shift 0 or 1 or similar; but EURUSD tick for time X may not still be generated and in fact the EURUSD last tick is at time X-1 so the macd shows the value at time X-1 tick. To be sure what you check, in onBar print the instrument first: console.getOut.println(instrument) got from onBar() and its time from bidBar.getTime(). Also, if you test using Tick on Close, better change and use Tick on Open.