Support Board
Date/Time: Tue, 25 Feb 2025 17:08:31 +0000
[Programming Help] - sc.GetVolumeAtPriceDataForStudyProfile returns always 1
View Count: 553
[2021-04-17 13:01:55] |
Ernie Doo - Posts: 46 |
Dear SC team, I am having some problems using sc.GetVolumeAtPriceDataForStudyProfile. This function should return 1 if succesful and 0 if not, right? Well it is always returning 1, also when it has reached the top of the profile and there is no more information available to fetch. If I ran a "while (sc.GetVolumeAtPriceDataForStudyProfile(VOLUME_BY_PRICE_STUDY, 0, Index, VolumeAtPrice)) ++Index;", it should eventually exit the loop, right? It doesn't. It stays in an infinite loop. I debugged it a little bit further and found out that once the function reaches the top of the Volume By Profile study it just keeps repeating the last values (PriceInTicks, Volume, BidVolume, AskVolume, NumberOfTrades) of the last index. With this last information I was able to just compare the prices from the current index vs the last index to exit the loop, which works, but I am not sure this function is working as intended. I know I could have used sc.GetNumPriceLevelsForStudyProfile to limit my loop, but this function is also giving me some strange data. I am not saying it doesn't work, I just wanted to have another way of looping through this information. Anyway, let me know if this is corrected so I can change my code back to normal, or if I am understanding it wrong and this is how it is supposed to work. Regards, Ernesto Date Time Of Last Edit: 2021-04-17 15:51:49
|
[2021-04-18 02:49:21] |
|
It is intended to use sc.GetNumPriceLevelsForStudyProfile However, we will look at sc.GetVolumeAtPriceDataForStudyProfile returning 0 for an invalid price index. 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: 2021-04-18 02:49:28
|
[2021-04-18 03:09:29] |
|
In the next release we are able to validate the price index and return 0.
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 |
To post a message in this thread, you need to log in with your Sierra Chart account: