Guys, For some reason I'm having trouble translating the following rules into a system:
1)It has closed below its 10-day moving average for at least 10 days. 2) It is above its 200-day moving average. 3) It made its lowest low of the recent selloff today. 4) It closed stretched further below its 10-day moving average than it has on any day of the recent selloff. Here's some of the code I have - but I think my approach is completely wrong: MAdiff = C - MA(10,C); MAlong = MA(200,C); MAdays = Ref(C,-10) < Ref(MA(C,10),-10) AND Ref(C,-9) < Ref(MA(C,10),-9) AND Ref(C,-8) < Ref(MA(C,10),-8) AND Ref(C,-7) < Ref(MA(C,10),-7) AND Ref(C,-6) < Ref(MA(C,10),-6) AND Ref(C,-5) < Ref(MA(C,10),-5) AND Ref(C,-4) < Ref(MA(C,10),-4) AND Ref(C,-3) < Ref(MA(C,10),-3) AND Ref(C,-2) < Ref(MA(C,10),-2) AND Ref(C,-1) < Ref(MA(C,10),-1) AND C < MA(C,10); Buy = MAdays AND LLV(C,10) AND C > MAlong AND HHV(MAdiff,10); Sell = C > MA(C,5);
