I am testing a few simple strategies, one of them being to buy when the Hull moving average changes from red to green. This has been addressed before and is easy to implement. However, when I run this strategy, ProRealTime only places orders at certain times and not others (see attachment). I have posted here the simplified code which is run on the US 500 Cash 1hour. What am I missing? //Market: US 500 Cash //Timeframe: 1h DEFPARAM CumulateOrders=False Period1=20 Period3=28 PositionSize = 1 timeframe(default) HullAverage1=WeightedAverage[round(sqrt(Period1))](2*WeightedAverage[round(Period1/2)](close)-WeightedAverage[Period1](close)) Bull1 = HullAverage1 >= HullAverage1[1] Bear1 = HullAverage1 =< HullAverage1[1] If (Bull1 and Bear1[1]) then buy PositionSize contract at market //SET STOP pLOSS sl endif HullAverage3=WeightedAverage[round(sqrt(Period3))](2*WeightedAverage[round(Period3/2)](close)-WeightedAverage[Period3](close)) //Bull3=HullAverage3>HullAverage3[1] Bear3 = HullAverage3 < HullAverage3[1] If Bear3 then sell at market endif graphonprice HullAverage1 graphonprice HullAverage3