Attached the file "Volatility_ATR.sqx" where the condition ATR(2)<ATR(22) is evaluated double time, for the long and short signal. In this case all is ok. If the same condition, see file "Volatility_ATR_KO.sqx" is evaluated one time in a rule type "If-Then-Else" at opening bar using a boolean variable I didn't get any results from backtest.