Go Back   DailyFX Forex Forum | FX Forum > FXCM Products and Services > FXProgrammers > Discussion / Support Forum > Price Engine Client SDK Support

Reply
 
Thread Tools Rate Thread
  #1 (permalink)  
Old 04-28-2009, 07:42 AM
Member
 
Join Date: Nov 2008
Posts: 35
yuvalaviel is on a distinguished road
Discrepancy between PEC and Marketscope prices

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 0ccys.lengthi++) {
                
logger.trace("CCY[" "]=" ccys[i]);
                
Instrument instr cTss.getSecurity(ccys[i]);
                if (
instr != null) {
                    
mdr.addRelatedSymbol(instr);
                }

                
IMessage msg mdr.toMessage(nullConnectionManagerEx.getMessageFactory());
                
String status cUserSession.send(msg);
            }

        } catch (
Exception e) {
            
e.printStackTrace();
        }

Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.

All times are GMT -5. The time now is 08:25 PM.
Copyright ©2009 Daily FX. All Rights Reserved.