Hi,
I noticed that the prices given by PEC and those given by Marketscope 2.0 differ.
The difference ranges between +1.4 pip and -1.2 pip.
This is true for all time intervals.
Most often however, the difference is exactly 0.9 pip.
I am looking at the Ask price.
Below is the query code.
Why is that and how can it be resolved?
Thanks,
Yuval.
PHP Code:
private void askForCandles(int aNumPeriods) {
//prepare MarketDataRequest
try {
MarketDataRequest mdr = new MarketDataRequest();
mdr.setFXCMTimingInterval(FXCM_INTERVAL);
mdr.setMDEntryTypeSet(MarketDataRequest.MDENTRYTYPESET_ASKEXTRA);
mdr.setSubscriptionRequestType(SubscriptionRequestTypeFactory.SNAPSHOT);
mdr.setTradingSessionID(cUserSession.getTradingSession().getID());
mdr.setTradingSessionSubID(cUserSession.getTradingSession().getSubID());
mdr.setFXCMNoSnapshot(aNumPeriods+1);
mdr.setMDReqID(cUserSession.getNextRequestID());
String[] ccys = cCcyPair.split(";");
for (int i = 0; i < ccys.length; i++) {
logger.trace("CCY[" + i + "]=" + ccys[i]);
Instrument instr = cTss.getSecurity(ccys[i]);
if (instr != null) {
mdr.addRelatedSymbol(instr);
}
IMessage msg = mdr.toMessage(null, ConnectionManagerEx.getMessageFactory());
String status = cUserSession.send(msg);
}
} catch (Exception e) {
e.printStackTrace();
}
}