Login Page - Create Account

Support Board


Date/Time: Mon, 27 Jun 2022 03:34:08 +0000



[Programming Help] - Help with: sc.VolumeAtPriceForBars->Clear() and sc.VolumeAtPriceForBars->SetVolume

View Count: 107

[2022-05-15 04:50:31]
GC5150 - Posts: 21
Hello,

I'm looking at VAPContainer.h to see if there is a way to clear or set/reset the volume at a specific PriceInTicks. I came across these two functions but trying to better understand what their intended usage is for.

Thank you, here are the two items I was referencing.


sc.VolumeAtPriceForBars->Clear();
sc.VolumeAtPriceForBars->SetVolumeAtPrice(const int PriceInTicks, const unsigned int BarIndex, const t_VolumeAtPrice& VolumeAtPrice)

[2022-05-15 11:10:32]
Sierra Chart Engineering - Posts: 103470
There are various functions to work with and different ones could be used for this purpose. We would have to look at what is available. However, you can definitely use this one to do what you want:

sc.VolumeAtPriceForBars->SetVolumeAtPrice

This volume at price data structure will update the existing one at the specified PriceInTick and BarIndex: VolumeAtPrice

This function fully clears out the memory for the entire VolumeAtPriceForBars object: sc.VolumeAtPriceForBars->Clear();
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
Date Time Of Last Edit: 2022-05-15 12:39:38
[2022-05-16 19:39:30]
GC5150 - Posts: 21
Hello,

One other question. Do you have a quick example of how I would setup the t_VolumeAtPrice element to pass to this function? I'm not having any luck getting it to work.

Thank you.
[2022-05-16 20:16:32]
Sierra Chart Engineering - Posts: 103470
That is a template type. Instead use this structure type:
s_VolumeAtPriceV2
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
Date Time Of Last Edit: 2022-05-16 20:16:39

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account