Login Page - Create Account

Support Board


Date/Time: Tue, 21 Jan 2025 07:30:18 +0000



Post From: HOWTO GET askvolume by GetAskVolumeAtPrice ?

[2018-07-30 07:49:05]
User574685 - Posts: 28
Doesn`t help at all ..........

if ((int)sc.VolumeAtPriceForBars->GetNumberOfBars() < sc.ArraySize)  return;
s_VolumeAtPriceV2 *p_VolumeAtPrice;

sc.VolumeAtPriceForBars->GetVAPElementAtPrice(sc.Index-1, MaxAskQuantityPrice_First);
if (p_VolumeAtPrice){MaxAskVolume_First = sc.VolumeAtPriceForBars->GetAskVolumeAtPrice(sc.Index-1, MaxAskQuantityPrice_First);}


I don`t get it ........
I get a vap element at exact price and then and i should receive askvolume at that price by GetAskVolumeAtPrice, right ?


That is working code, but how can i get a Vbp index from exact price ? ......
sc.VolumeAtPriceForBars->GetVAPElementAtIndex(sc.Index-1, MaxAskQuantityPrice_First*sc.TickSize, &p_VolumeAtPrice);
if (p_VolumeAtPrice){MaxAskVolume_First = p_VolumeAtPrice->AskVolume;}
sc.VolumeAtPriceForBars->GetVAPElementAtIndex(sc.Index-1, MaxBidQuantityPrice_First*sc.TickSize, &p_VolumeAtPrice);
if (p_VolumeAtPrice){MaxBidVolume_First = p_VolumeAtPrice->BidVolume;}
Date Time Of Last Edit: 2018-07-30 07:52:10