p1:=10;
p2:=10;
p3:=5;
v1:=(H+O+L+2*C)/5;
V2:=REF(V1,1);
V3:=MAX(V1-V2,0);
V4:=Abs(V1-V2);
V5:=SMA(V3,P1,1);
V6:=SMA(V4,P1,1);
V8:=COUNT(V5/V6<0.2,P3);
V9:=COUNT(LLV(V1,P2)=V1,P2);
P:IF(V8>=1 AND V9>=1 AND CLOSE>OPEN AND REF(CLOSE,1)>REF(OPEN,1) AND vol>REF(VOL,1),1,0);