For IF THEN ELSE Condition for ON BAR UPDATE checks, ELSE should also be only executed for ON BAR UPDATE. It is working as ON TICK NOW, so taking action after each tick and not only during the cases where ON BAR UPDATE Is executed. This is bringing improper results. Example:
//------------------------
// Rule: CandCountS
//------------------------
if (_sqIsBarOpen == true
&& sqMarketPositionIsShort(MagicShort1, "Current", "")
)
{
// Action #1
CandlesInTradeCountS = (CandlesInTradeCountS + AssignVrbVleEntMlt2);
} else {
// Action #1
CandlesInTradeCountS = AssignVrbVleEntMlt3;
}
Action for ELSE is executed even when Market position above IS SHORT but the event is between Candles (first condition : "_sqIsBarOpen == true" is not met)