ma30:=ma(close,30);ma60:=ma(close,60);value_a:=filterx(cross(ma30,ma60),barscount(close));value_b:=cross(macd.dir,macd.dea) and macd.macd>=0;value:barssince(barslast(value_a)>o and value_b)=0;
count(ref(c,1)/ref(c,2)>1.07 and ref(c,1)/ref(o,1)>1.07,5)>=1 and every(ref(c,1)>ma(c,20),5) and ref((l,h),1)<>ref((c,o),1) and abs(ref(c,1)/ref(o,1)-1)<0.005 and c>ref(h,1);