people with nt,
i have been trying to incorporate the concretum bands indicator into some of my strategies.
i want to define variables to indicate whether price has closed outside of the bands at any point during a trading session (lower than, higher than or either). this value should be valid for the remainder of the session and then all variables should be set to false when the session is over.
i thought this structure below should work but the results have been nonsensical as the strategy places all kinds of trades every day, when it should only place trades on at most half of the sessions and sometimes only short, sometimes only long and rarely in both directions.
¿is there any better way to define variables that indicate the states i have described?
if (Bars.IsFirstBarOfSession)
{
var01 = false;
var02 = false;
var03 = false;
}
if (Closes[1][0] < cb1.Lowerband[0])
{
var01 = true;
var03 = true;
}
if (Closes[1][0] > cb1.Upperband[0])
{
var02 = true;
var03 = true;
}
very well, regards.

Comment