How to interpret 35=W and 35=X?

Created at 10 Dec 2018, 06:31
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
NE

netread2004

Joined 26.12.2017

How to interpret 35=W and 35=X?
10 Dec 2018, 06:31


I am trying to get Bid and Ask value on the fly of currency pair.

Based on Rules of engagement document I am trying interpret 35=X message (same for 35=W) as follows:

1)Scan the whole message from left to right for given symbol (55=1 EURUSD or 55=2 for GBPUSD)

2)get the tag type 269 - if it is 0 then next tag type 270 vlaue will be interprested as Bid Value

3)If 269 if 1 then next 270 value as Ask value.

If more than one Ask value in a single message minimum of Ask is considered final Ask and if more than one Bid values in given single message then Maximum of Bid values will be final Bid value.

I do not consider 268, 279 or any other tag.

I am sending 35=V and  receiveing (35=W or 35=X) message periodically at 100ms interval.

Based on above steps if I scan following message:

SendText : 8=FIX.4.4 9=146 35=V 49=icmarkets.3394382 56=cServer 57=QUOTE 50=TRADE2 34=162 52=20181210-04:03:55 262=1473130189 263=1 264=0 265=1 267=2 269=0 269=1 146=1 55=2 10=142 

ReceivedText : 8=FIX.4.4 9=302 35=X 34=155 49=cServer 50=QUOTE 52=20181210-04:04:00.289 56=icmarkets.3394382 57=TRADE2 268=5 279=0 269=0 278=18806614 55=2 270=1.27462 271=600000 279=0 269=0 278=18806615 55=2 270=1.27459 271=3000000 279=0 269=0 278=18806611 55=2 270=1.2746 271=1000000 279=2 278=18805374 55=2 279=2 278=18805375 55=2 10=122 

 

I get followng ASk Bid value for GBPUSD

Bid: 1.27462 Ask: 1.27472 Spread : 1 

Spread here is 10 points. 

From the message one can see that I am using Icmarket.

But this does not match with icmarket cTrader spread at any given point.

Not sure the way i am interpreting this message is correct way or not but I am not getting these Ask and Bid value correct.

I would appreciate if you could give me some insight on this Ask/Bid calculation method.

 

 

 


@netread2004
Replies

PanagiotisCharalampous
10 Dec 2018, 14:20

Hi netread2004,

Message 35=X is incremental update. So it will stream to you only additions and deletions. The quote prices might have already been streamed to you by 35=W. What spread do you get with 35=W?

Best Regards,

Panagiotis


@PanagiotisCharalampous

netread2004
10 Dec 2018, 15:20

For GBPUSD, with 35=W I get spread 1 to 6 points (I restart and send this message 3-5 time to get multiple spread values) which appear to be consistent with value I get in cTrader.

However, I receive 35=W only once when I send  MarketDataRequest message  and for next MarketDataRequest message i receive 35=X message.

If I only get 35=W only once then how can I get Ask and Bid on the fly constantly? Is there any way to get 35=W everytime I send MarketDataRequest?

 

 


@netread2004

PanagiotisCharalampous
10 Dec 2018, 17:12

Hi netread2004,

At the moment only incremental refresh is supported therefore you will receive a 35=W at the begining and 35=X afterwards. You need to check your update procedure and make sure it is correctly implemented.

Best Regards,

Panagiotis 


@PanagiotisCharalampous

netread2004
11 Dec 2018, 00:01


Hi Panagiotis,

I am trying to debug my program to find out why I am getting such higher values of spread when I use 35=X message to calculate Ask and Bid values.

Based on values I get from 35=X for Bid and Ask my spread  appears to be very high which is not consistent with cTrader spread for ICmarkets.

Not sure how else I can inteprete these messages to get correct value of spread.

The following message has both Ask and Bid values in single message that means both values updated in single message and are the latest one.

I calculate Max Bid and Min Ask to find out Spread as explained follows;

-------------------two consecutive FIX message for35=V and  35=X------------

2018.12.10 13:41:30.874 GBPUSDi,M1: ReceivedText : 8=FIX.4.4 9=388 35=X 34=16 49=cServer 50=QUOTE 52=20181210-21:41:33.571 56=icmarkets.3394382 57=TRADE2 268=7 279=0 269=1 278=104704685 55=2 270=1.25624 271=5000000 279=0 269=1 278=104704683 55=2 270=1.25622 271=3000000 279=0 269=0 278=104704680 55=2 270=1.25606 271=3000000 279=0 269=0 278=104704677 55=2 270=1.25605 271=5000000 279=2 278=104700659 55=2 279=2 278=104701794 55=2 279=2 278=104700078 55=2 10=058 

2018.12.10 13:41:30.873 GBPUSDi,M1: SendText : 8=FIX.4.4 9=142 35=V 49=icmarkets.3394382 56=cServer 57=QUOTE 50=TRADE2 34=16 52=20181210-21:41:23 262=6827819 263=1 264=0 265=1 267=2 269=0 269=1 146=1 55=2 10=200 
-----------------------------end of the messages-----------------

From above message New (279=0) values for Ask and Bid are as follows;

Ask Values - 1.25624, 1.25622   -- Minimum Ask - 1.25622

Bid Values : 1.25606, 1.25605  -- Maximum Bid - 1.25606

From above Spread = 1.6 pips

Not sure how I can get the correct spread value.  Is there any other way interpret these Ask and Bid value. I believe Spot value for Ask and Bid is Min Ask and Max Bid in a given single message. is that right?

Please comment on this and let me know if I can use some other alternative way to get these values right.

 

 


@netread2004

PanagiotisCharalampous
11 Dec 2018, 11:02

Hi netread2004,

I do not see the 35=W message which should have been the full snapshot. 35=X is just additions and deletions on the full snapshot so it doesn't give the full picture.

Best Regards,

Panagiotis 


@PanagiotisCharalampous

netread2004
11 Dec 2018, 14:47

Here is the first 35=W (34=2) message and 35=X (34=3) following that.

-----------------------------------------------------------------------------------------------

 

2018.12.11 04:37:00.012 GBPUSDi,M1: ReceivedText : 8=FIX.4.4 9=306 35=X 34=3 49=cServer 50=QUOTE 52=20181211-12:36:18.147 56=icmarkets.3394382 57=TRADE2 268=5 279=0 269=1 278=156431374 55=2 270=1.26191 271=5000000 279=0 269=1 278=156431375 55=2 270=1.2619 271=3000000 279=0 269=1 278=156431372 55=2 270=1.26189 271=1000000 279=2 278=156430419 55=2 279=2 278=156430416 55=2 10=050 

2018.12.11 04:37:00.012 GBPUSDi,M1: SendText : 8=FIX.4.4 9=142 35=V 49=icmarkets.3394382 56=cServer 57=QUOTE 50=TRADE2 34=3 52=20181211-12:36:59 262=36147899 263=1 264=0 265=1 267=2 269=0 269=1 146=1 55=2 10=216 

2018.12.11 04:36:17.652  GBPUSDi,M1: ReceivedText : 8=FIX.4.4 9=444 35=W 34=2 49=cServer 50=QUOTE 52=20181211-12:36:17.682 56=icmarkets.3394382 57=TRADE2 55=2 268=8 269=1 270=1.26188 271=1000000 278=156430419 269=1 270=1.2619 271=8000000 278=156430416 269=1 270=1.26184 271=100000 278=156430417 269=1 270=1.26185 271=500000 278=156430420 269=0 270=1.26177 271=5000000 278=156430414 269=0 270=1.26179 271=1000000 278=156430415 269=0 270=1.2618 271=600000 278=156430412 269=0 270=1.26178 271=3000000 278=156430413 10=002 

2018.12.11 04:36:17.651 GBPUSDi,M1: SendText : 8=FIX.4.4 9=144 35=V 49=icmarkets.3394382 56=cServer 57=QUOTE 50=TRADE2 34=2 52=20181211-12:36:17 262=1482094742 263=1 264=0 265=1 267=2 269=0 269=1 146=1 55=2 10=045 

 

from 35=W --  Bid : 1.2618 Ask : 1.26184 Spread : 0.4 

from 35=X which immediatly follows above 35=W -  Bid: 1.2618 Ask : 1.26189 Spread : 0.9 

 

35=W is received only once in the begining and after that all messages are 35=X.

Spread 0.9 pips from 35=X is Not consistent with the spread as in Icmarket cTrader.

 

 


@netread2004

PanagiotisCharalampous
11 Dec 2018, 15:17

Hi netread2004,

Ask price 1.26184 is provided by entry with ID 156430417. 35=X has no instruction to delete entry id 156430417. In instructs you to delete only 156430419 and 156430416. Why do you delete it?

Best Regards,

Panagiotis

 


@PanagiotisCharalampous

... Deleted by UFO ...