Login Page - Create Account

Support Board


Date/Time: Wed, 27 Nov 2024 18:50:49 +0000



Post From: brick size

[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