Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 09:32:54 +0000



Post From: Sierra Chart Now Supports Building Custom Chart Bars Efficiently in ACSIL

[2018-05-01 02:33:43]
Andy Sureway - Posts: 93
Here is my guesses:

Method 1
ChartBarInterface.GetChartBarValue(SC_LAST, ChartBarInterface.CurrentBarIndex);
to get the current tick price.

ChartBarInterface.GetChartBarValue(SC_BID_PRICE, ChartBarInterface.CurrentBarIndex);
to get the current tick bid price.

ChartBarInterface.GetChartBarValue(SC_ASK_PRICE, ChartBarInterface.CurrentBarIndex);
to get the current tick ask price.

ChartBarInterface.GetChartBarValue(SC_VOLUME, ChartBarInterface.CurrentBarIndex) - ChartBarInterface.GetChartBarValue(SC_VOLUME, ChartBarInterface.CurrentBarIndex-1);
to get the current tick volume.


Method 2

Another approach I could think about is to write these corresponding fields of SCStudyInterfaceRef from the study function to persistent variables and then in the fp_ACSCustomChartBarFunction function, they are read out from the persistent variables.


Question 2

Please comment and advice on the above two methods! Thanks!


Also please comment whether
ChartBarInterface.StartNewBarFlag = 1;
creates a new bar from the next tick.
Date Time Of Last Edit: 2018-05-01 02:34:10