Please login or register in order to view and post in the Forum.
Robert,
You declare an instance of class MARKET_DEPTH.
MARKET_DEPTH depth;
You can ensure that it's available with...
if (depth.available() == false) return RTX_FAIL;
You can then access the max number of levels with...
int iMaxLevels = depth.maxLevels;
Then ....
int xBid = 0;
while(xBid < iMaxLevels ) { bidTotal += depth[xBid].bidsize; askTotal += depth[xBid].asksize; xBid++; }
Let me know if that answers your question.
_
Robert,
You declare an instance of class MARKET_DEPTH.
MARKET_DEPTH depth;
You can ensure that it's available with...
if (depth.available() == false)
return RTX_FAIL;
You can then access the max number of levels with...
int iMaxLevels = depth.maxLevels;
Then ....
int xBid = 0;
while(xBid < iMaxLevels )
{
bidTotal += depth[xBid].bidsize;
askTotal += depth[xBid].asksize;
xBid++;
}
Let me know if that answers your question.
_