Login Page - Create Account

Support Board


Date/Time: Sat, 21 Jun 2025 17:12:56 +0000



Post From: Get the price level from Large Trade Volume Trade Indicator

[2022-04-26 10:21:58]
User431178 - Posts: 716
Suggest reviewing the header file VAPContainer.h for more information, however the example below compiles fine.


s_VolumeLevelAtPrice* p_VolumeLevelAtPrice = nullptr;

int VAPSizeAtBarIndex = sc.p_VolumeLevelAtPriceForBars->GetSizeAtBarIndex(BarIndex);
unsigned int MaxTradeVol = 0;
float MaxTradePrice = 0.0f;

for (int VAPIndex = 0; VAPIndex < VAPSizeAtBarIndex; VAPIndex++) {
  if (!sc.p_VolumeLevelAtPriceForBars->GetVAPElementAtIndex(BarIndex, VAPIndex, &p_VolumeLevelAtPrice))
    break;

  unsigned int maxTradeVolAtPrice = sc.p_VolumeLevelAtPriceForBars->GetMaxVolumeAtPrice(BarIndex, p_VolumeLevelAtPrice->PriceInTicks);

  if (maxTradeVolAtPrice > MaxTradeVol)
  {
    MaxTradeVol = maxTradeVolAtPrice;
    MaxTradePrice = sc.TicksToPriceValue(p_VolumeLevelAtPrice->PriceInTicks);
  }
}