Support Board
Date/Time: Sun, 12 Jan 2025 12:01:49 +0000
Post From: How to set condition to trigger email?
[2016-08-05 06:13:48] |
Sierra Chart Engineering - Posts: 104368 |
You will need to use the Advanced Custom Study Interface and Language for this. Here is the documentation for that: Advanced Custom Study Interface and Language (ACSIL) The first step is to go through the step-by-step instructions here to create a simple study: Advanced Custom Study Interface and Language (ACSIL): Step-By-Step Instructions to Create an Advanced Custom Study Function Here is a specific code example you are looking for: // Get the sum of the volumes from all of the prices at this bar by using sc.VolumeAtPriceForBars->GetNextHigherVAPElement()
unsigned int TotalVolume = 0; int CurrentVAPPriceInTicks = INT_MIN ; // This will be incremented from the lowest to highest price tick in the bar const s_VolumeAtPriceV2 *p_VolumeAtPrice; while (sc.VolumeAtPriceForBars->GetNextHigherVAPElement(sc.Index, CurrentVAPPriceInTicks, &p_VolumeAtPrice)) { TotalVolume += p_VolumeAtPrice->Volume; //Calculate the price. This requires multiplying p_VolumeAtPrice->PriceInTicks by the tick size float Price = p_VolumeAtPrice->PriceInTicks * sc.TickSize; //Other members available: //p_VolumeAtPrice->AskVolume; //p_VolumeAtPrice->BidVolume; //p_VolumeAtPrice->NumberOfTrades; } Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |