Thanks danatrader, yes and you are right.

But what I meant is another issue: the "BuyLimit" and "SellLimit" variables seems redundant. For the enterLong conditions, for example, as long as "!NumOpenLong && Fast[0]>Slow[0]" is satisfied, "Closes[0]<BuyLimit" should be satisfied for sure.

I just don't understand why we include such a redundant condition check (Closes[0]<BuyLimit) here.