Login Page - Create Account

Support Board


Date/Time: Tue, 26 Aug 2025 10:23:00 +0000



Post From: ACSIL help

[2025-07-17 15:10:50]
User431178 - Posts: 764
If you need only this:


I'm trying to calculate "Finish Ask Volume Bid Volume Difference (Finish AskVol BidVol Diff)" in my custom study.
My script correctly identifies the "Ask Volume Bid Volume Difference High" and "Ask Volume Bid Volume Difference Low"; which are the two elements needed for "Finish Ask Volume Bid Volume Difference (Finish AskVol BidVol Diff)" - see below.

Then you are probably making the whole thing way more complicated than it needs to be.

Set this in sc.SetDefaults

sc.MaintainAdditionalChartDataArrays = 1;

The get delta finish like this:


const auto delta = sc.AskVolume[index] - sc.BidVolume[index];

if (sc.BaseDataIn[SC_ASK_BID_VOL_DIFF_MOST_RECENT_CHANGE][index] > 0)
DeltaFinish[index] = sc.BaseDataIn[SC_ASKBID_DIFF_HIGH][index] - delta;
else if (sc.BaseDataIn[SC_ASK_BID_VOL_DIFF_MOST_RECENT_CHANGE][index] < 0)
DeltaFinish[index] = sc.BaseDataIn[SC_ASKBID_DIFF_LOW][index] - delta;
else
DeltaFinish[index] = 0.0f;

Problem solved?

For definitions of data arrays used, you can check here:
ACSIL Interface Members - Variables and Arrays: sc.BaseDataIn[][] / sc.BaseData[][]

Of course, if there is some reason why you want to calculate it yourself from the underlying data, then I'll go away now.
Date Time Of Last Edit: 2025-07-17 15:11:57