Login Page - Create Account

Support Board


Date/Time: Sun, 29 Dec 2024 17:07:50 +0000



Accessing chart bar period from within strategy

View Count: 827

[2016-01-29 14:59:13]
wat - Posts: 67
Hello, I am trying to get Bar period of chart the strategy is running on but so far I have only found method sc.GetChartName(sc.ChartNumber); to get whole name. Is it possible to get only the time part?

For example when I am on chart named NQ-201603-GLOBEX[CBV] 240 Min I would like to get 240.

Thank you.
[2016-01-29 17:48:09]
Sierra Chart Engineering - Posts: 104368
There are variables providing these values. Refer to:
https://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Variables_And_Arrays.html
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
[2016-02-02 15:14:33]
wat - Posts: 67
I have thoroughly checked documentation but couldnt find a way to get (something like) IntradayBarPeriodType and IntradayBarPeriodLength for current chart (or get ChartParameters in general). Could you help me with that a bit more?

Thank you
[2016-02-02 18:53:54]
Sierra Chart Engineering - Posts: 104368
There are Variables and Functions for this. For example:
https://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Variables_And_Arrays.html#scVolumePerBar
https://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Functions.html#scAreVolumeBars
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
Date Time Of Last Edit: 2016-02-03 18:04:55
[2016-02-03 13:22:02]
wat - Posts: 67
Thank you but I need to get time per bar, not volume.
[2016-02-03 18:09:48]
Sierra Chart Engineering - Posts: 104368
We had thought that you would look through that page and find the proper variable. Here it is:
https://www.sierrachart.com/index.php?page=doc/doc_ACSIL_Members_Variables_And_Arrays.html#scSecondsPerBar

Always check the documentation first.
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
[2016-02-04 14:11:54]
wat - Posts: 67
I had thought that you will point me directly and save me half hour searching function that is not intuitively searchable instead of pointing me somewhere else and waste both of our time. Thank you anyway.
[2016-02-04 18:18:37]
Sierra Chart Engineering - Posts: 104368
It should not take a half hour to search that page. You should have been able to find it within a couple of minutes.

And it is also important, that you do take the time to study the documentation and minimally rely upon us. In some cases we are not going to provide information easily because this is time-consuming for us and users should search for information which is easily found. This is especially the case with programming related questions.
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
Date Time Of Last Edit: 2016-02-04 18:19:41

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account