Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 14:06:58 +0000



Post From: Change a chart's periodicity based on symbol

[2019-12-06 11:44:32]
T44 - Posts: 363
Yes, I do this using ACSIL.

e.g.

//Check if the first two characters of the symbol are "ES"
int IsES; IsES = sc.Symbol.CompareNoCase("ES",2);

if (IsES == 0) {
//if the symbol is ES then set the volume per bar to 5000V- use sc.SetBarPeriodParameters here
n_ACSIL::s_BarPeriod NewBarPeriod;
NewBarPeriod.ChartDataType = INTRADAY_DATA;
NewBarPeriod.IntradayChartBarPeriodType = IBPT_VOLUME_PER_BAR ;
NewBarPeriod.IntradayChartBarPeriodParameter1 = 5000;

//Set the bar period parameters. This will go into effect after the study function returns.
sc.SetBarPeriodParameters(NewBarPeriod);
}
see sc.SetBarPeriodParameters()
Date Time Of Last Edit: 2019-12-06 11:51:45