Replies

hans177
30 Mar 2017, 18:37

Nevermind, updated the library. Now everything works.


@hans177

hans177
27 Mar 2017, 15:28

Ok, I managed to do it, without really understanding what I'm doing of course ;)

1. Subscribe to quote updates

2.

private AsyncCallback quoteReceived;
...
quoteReceived = new AsyncCallback(OnTick);
...
_priceStream.BeginRead(buffer, 0, 1024, quoteReceived, null);

3.

        private void OnTick(IAsyncResult ar)
        {
            int bytesRead = _priceStream.EndRead(ar);

            if (bytesRead > 0)
            {
                Console.WriteLine(Encoding.ASCII.GetString(buffer, 0, bytesRead));
                _priceStream.BeginRead(buffer, 0, 1024, quoteReceived, null);
            }
        }

 

 


@hans177

hans177
27 Mar 2017, 13:57

Hi, looks to me like you are getting quote replies.

How do you get these MarketDataSnapshotFullRefresh-messages? What's the best way to do it? Some endless _priceStream.Read-loop?


@hans177

hans177
27 Mar 2017, 13:52

Why do you keep sending messages to get new quotes after sending 263=1


@hans177

hans177
26 Mar 2017, 14:09

I guess I have to set a timer and check for new data, because there is no system event when there is new data available on the TCP stream?


@hans177

hans177
25 Mar 2017, 10:59

I'm quite expierenced in MQL4/5. There you got functions like OnTick(), which is called in case of a new quote. Unfortunately the tutorial isn't really explaining basic stuff about FIX API very well in my opinion. Can I only get a single response to a message I sent or can I get continuos messages (which I assumed 'subscribing to future quote updates' meant)?


@hans177