Getting volume?

Created at 30 Jun 2016, 19:54
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!
JH

jhonti

Joined 30.06.2016

Getting volume?
30 Jun 2016, 19:54


I've had a look but I can't find how to get the volume at the current point in time, not the volume of a trade, but rather the volume of the market. How can I do this?


@jhonti
Replies

moneybiz
30 Jun 2016, 21:25

            foreach (var askEntry in MarketData.GetMarketDepth(Symbol).AskEntries)
            {
                Print("Ask Price: {0}; Ask Volume{1}.", askEntry.Price, askEntry.Volume);
            }

 


@moneybiz

jhonti
30 Jun 2016, 23:45

RE:

moneybiz said:

            foreach (var askEntry in MarketData.GetMarketDepth(Symbol).AskEntries)
            {
                Print("Ask Price: {0}; Ask Volume{1}.", askEntry.Price, askEntry.Volume);
            }

 

Thanks for your help, however this seems to give different results to using the market snapshot tool, why is this?


@jhonti

moneybiz
01 Jul 2016, 12:53

RE: RE:

jhonti said:

Thanks for your help, however this seems to give different results to using the market snapshot tool, why is this?

There is also BidEntries like the above AskEntries that you can enumerate.
I never used it so I don't know if they are different or not.
Make sure you're looking at the same instruments when comparing. I mean compare EURUSD and EURUSD. Not EURUSD and GBPUSD.
And make sure the two clients you're comparing are connected to the same broker.


@moneybiz