Login Page - Create Account

Support Board


Date/Time: Thu, 02 May 2024 23:08:32 +0000



Post From: n_ACSIL::s_BarPeriod BarPeriod not working

[2018-10-03 14:02:09]
User982500 - Posts: 2
Hi guys
I'm trying to get this function to work.
No matter what I try, I keep receiving the error message as I listed below.
I'm using the Remote Compiler.
I have also tried having no chartbooks open when I remote compile.
Naturally, I assumed I needed to have at least 1 chart open that used a IBPT_DAYS_MINS_SECS timeframe.
Can you please tell me what I am doing wrong.
I'm simply trying to capture what timeframe the open chart is using to be able to alter some other
parameters of my custom study.



n_ACSIL::s_BarPeriod BarPeriod;
sc.GetBarPeriodParameters(BarPeriod);
if (BarPeriod.ChartDataType == INTRADAY_DATA && BarPeriod.IntradayChartBarPeriodType == IBPT_DAYS_MINS_SECS)
{
int SecondsPerBar = BarPeriod.IntradayChartBarPeriodParameter1;
}

Error message:
'SecondsPerBar' was not declared in this scope

Thanks....Steve