Support Board
Date/Time: Wed, 22 Jan 2025 14:59:31 +0000
n_ACSIL::s_BarPeriod BarPeriod not working
View Count: 650
[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 |
[2018-10-03 17:04:07] |
Sierra Chart Engineering - Posts: 104368 |
Based upon the error message, the problem is that you are accessing int SecondsPerBar outside of the code block it is being defined in.Naturally, I assumed I needed to have at least 1 chart open that used a IBPT_DAYS_MINS_SECS timeframe. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2018-10-03 18:20:17] |
User982500 - Posts: 2 |
Thanks a million....global vs local variable...how goofy of me for not seeing it !!
|
To post a message in this thread, you need to log in with your Sierra Chart account: