Login Page - Create Account

Support Board


Date/Time: Mon, 21 Apr 2025 23:36:07 +0000



[User Discussion] - Volume At Price data not available for Historical Chart

View Count: 115

[2025-02-12 17:39:56]
skalaydzhiyski - Posts: 71
Hello SC,

I am trying to build an indicator that determines Day Types (P-shaped, b-shaped, balanced, Double Distribution, etc..) based on the volume at price data you usually have available for intraday charts. The code I am using to interrogate the VolumeAtPriceForBars structure is below:


SCSFExport scsf_Indicator_DayType(SCStudyInterfaceRef sc)
{
namespace pth = phitech::helpers;

if (sc.SetDefaults)
{
sc.GraphName = "Indicator_DayType";
sc.StudyDescription = "Phi Technologies study for Sierra.";
sc.AutoLoop = 1;
sc.GraphRegion = 0;

sc.MaintainVolumeAtPriceData = 1;
return;
}

if (sc.IsFullRecalculation)
return;

pth::print(sc, "number of bars of volume by price -> %d", sc.VolumeAtPriceForBars->GetNumberOfBars());
// this prints 0 in the console when applied to historical charts
// and X (where X is a valid value) when applied to intraday charts.
}

Am I doing something wrong here ?

Workarounds are also welcome..

All the best,
[2025-02-12 20:24:22]
skalaydzhiyski - Posts: 71
Guys, please that is not really programming help, I am just trying to understanding how the sc.VolujmeAtPriceForBars works for historical charts... that's not within the scope of programming help, I just need to be pointed at the right documentation that describes this scenario...
[2025-02-13 10:09:15]
skalaydzhiyski - Posts: 71
For anyone wondering what to do in the above case -> have a look at sc.GetStudyProfileInformation it has all necessary information.
[2025-02-13 10:55:18]
User431178 - Posts: 654
I suggest reading this: Volume By Price Study: How Volume by Price is Calculated for Historical Daily and Higher Timeframe Charts

Calculating profile shape from historical charts is not going to yield accurate results as the calculated volume at price data bears no reflection to the real data.

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

Login

Login Page - Create Account