Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 18:46:52 +0000



[Programming Help] - brick size

View Count: 333

[2023-07-04 16:18:00]
WeroTrader - Posts: 46
Greetings, Sierra Chart team.

I ask for your help to solve two doubts that I have.

1) Which ACSIL code function can return me the brick size of the current chart?

2) Is there a reference study I can use to find out how I can change the brick size on a Renko chart?

I'm not looking for a specific code, I'm just asking for a guide so I can study the documentation.

I thank you for your answer and I remain attentive to it.
[2023-07-05 13:14:25]
John - SC Support - Posts: 36331
The main references for ACSIL are the following (Variables and Functions):
ACSIL Interface Members - Variables and Arrays

https://www.sierrachart.com/index.php?page=doc/ACSIL_Members_Functions.html

There other sections for more specific items like trading or using buttons. You will find all the sections for the ACSIL documentation at the following link:
Table of Contents | (Advanced Custom Study/System Interface and Language (ACSIL))
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-07-05 15:05:31]
Sierra_Chart Engineering - Posts: 17198
1, 2. These are the functions you need:
sc.GetBarPeriodParameters()
sc.SetBarPeriodParameters()
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-07-19 02:52:44]
WeroTrader - Posts: 46
Thanks for the responses, they have been very helpful



I have made this function for an automatic trading system:



void ChangeBrick(SCStudyGraphRef sc, int CurrentBrick, int ChgBrick)
{
if (CurrentBrick != ChgBrick)
{
n_ACSIL::s_BarPeriod NewBarPeriod;

NewBarPeriod.IntradayChartBarPeriodParameter1 = ChgBrick;

//Set the bar period parameters. This will go into effect after the study function returns.

sc.SetBarPeriodParameters(NewBarPeriod);
}
}

The problem is that when I call it, it keeps resizing the brick over and over again like an infinite loop.

Could you give me some reference or explanation of the problem?

NOTE: The function is called from another code, which has in its structure several "return;" and i think this could be the cause of the problem

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

Login

Login Page - Create Account