Login Page - Create Account

Support Board


Date/Time: Mon, 21 Apr 2025 14:59:39 +0000



Post From: DRAWING_VOLUME_PROFILE Example Study

[2025-04-19 02:46:38]
User200641 - Posts: 6
To anyone reading this in the future:

I ended up using a VbP study and then updating the start date/start time from my custom study. This also allows easier modification than having to update a config, etc.

Note that the inputs for date/time are separate for the VbP study (unlike the VWAP study). I had trouble just passing the full SCDateTime (as a double). Using something like this worked:



// This is the datetime you want VbP to start at
SCDateTime newDateTime {generateEventDateTime()};

// This will be passed to the "Start Date" VbP input
int date {newDateTime.GetDate()};

// This will be passed to the "Start Time" VbP input
SCDateTime timeOnly {newDateTime.GetTimeAsSCDateTime()};

// Setting the VbP study Start Date input
sc.SetChartStudyInputInt(sc.ChartNumber, Input_VbPStudyID.GetStudyID(), 36, date);
// Setting the VbP study Start Time input
sc.SetChartStudyInputFloat(sc.ChartNumber, Input_VbPStudyID.GetStudyID(), 38, time_only.GetAsDouble());