Hi All, I have a simple S&R system, however noticed strange thing, which cannot understand: sometimes it happens that based on the code below, there is not transaction when it should be. For example let say, that we have a short position. Then on the next day price is moving up and crosses (or equals) BuySignal ==> then system should close short and open long. Code below works this way 99% of time, however sometimes (not always) when the given bar penetrates both BuySignal and SellSignal, it's not executing order at all. Many thanks in advance for any help.
Buy = Cross( H, BuySignal ) || H == BuySignal; Sell = Cross( SellSignal, L ) || L == SellSignal; Short = Sell; Cover = Buy; BuyPrice = BuySignal; SellPrice = SellSignal; ShortPrice = SellPrice; CoverPrice = BuyPrice;