Login Page - Create Account

Support Board


Date/Time: Mon, 21 Apr 2025 15:45:26 +0000



Post From: DRAWING_VOLUME_PROFILE Example Study

[2025-04-17 03:41:03]
User200641 - Posts: 6
I am attempting to draw a volume profile starting when an even occurs in my custom study. There are debug statements in my code that show this block is getting run when the event triggers. Config 3 is the VP config I set up and want to use for this study (followed the steps here: Volume By Price Study: Step by Step Instructions to Configure the Draw Volume Profile Tool).

Will there be an example study for using DRAW_VOLUME_PROFILE added in the future? My search of the ACS_Source directory didn't find anything.


if(event)
{
s_UseTool Tool;
int& r_LineNumber= sc.GetPersistentInt(1);
if (r_LineNumber!= 0)
Tool.LineNumber = r_LineNumber;

Tool.ChartNumber = sc.ChartNumber;
Tool.DrawingType = DRAWING_VOLUME_PROFILE;

Tool.BeginIndex = sc.Index;

// I also tried with BeginDateTime
// Tool.BeginDateTime = sc.BaseDateTimeIn[sc.Index];

Tool.Region = 0;
Tool.UseToolConfigNum = 3;

Tool.AddMethod = UTAM_ADD_OR_ADJUST;

sc.UseTool(Tool);
r_LineNumber = Tool.LineNumber;

}