Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 06:54:40 +0000



[Programming Help] - GET VOLUME BY PRICE STUDY VALUES (POC, VAH, VAL)

View Count: 298

[2023-12-22 16:04:59]
User103688 - Posts: 9
Hi everyone,
I'm trying to get the value of POC, VAH, VAL from VbP study to my custom study.

SCFloatArray otherStudyData;
sc.GetStudyArray(1, 1, otherStudyData);

The subgraph of POC is the first one. but if I try to print it on Message Log, result like 0.


float subgraphValue = otherStudyData[sc.Index];

// Prepare the log message
SCString logMessage;
logMessage.Format("Subgraph value at current bar: %f", subgraphValue);

// Add the message to the log
sc.AddMessageToLog(logMessage, 0);

Can you help me, please?
[2023-12-23 20:29:24]
LudaTrades - Posts: 27
Try using sc.GetStudyProfileInformation(), this function is more suited to that purpose I think.
sc.GetStudyProfileInformation


Using sc.GetStudyArray you can run into calculation precedence causing 0 values to return. You probably also have to be sure your VbP draw mode set correctly, just off the top of my head. I would just use sc.GetStudyProfileInformation(), otherwise refer to

sc.GetStudyArray()
and
ACSIL Interface Members - Variables and Arrays: sc.CalculationPrecedence

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

Login

Login Page - Create Account