Hi All, Could someone let me know where I'm going wrong. This system is supposed to go long when certain criteria are met but it's making trades while the criteria is not present.
The 200 day moving average is supposed to be greater than the 200 day moving average from 50 days ago by a factor of 5 times the ATR (200). Then there is to be a negative gradient in the 3 day moving average within the last 3 days inclusive. Price must then make a new high. Can anyone see any glaring mistakes? Gradient = MA(C,200) - Ref(MA(C,200),-50); GradientB = 5 * ATR(200); Buy = Gradient > GradientB AND BarsSince(MA(C,3) - Ref(MA(C,3),-1) < 0) <= 3 AND H > Ref(HHV(H,1),-1); Buy = Open > Ref( Low , -1 ); Sell = Close < Ref( LLV( Low , 3 ),-1); cheers Deam
