nday := 3;
down := close/llv(low,60)<=1.2;
pma1 := ma(close,2);
pma2 := ma(close,5);
diff :ema(close,12) - ema(close,26),colorwhite;
dea :ema(diff,9),colorgreen;
vma1:ma (vol,2)/100000,colorred;
vma2:ma(vol,5)/100000,coloryellow;
ppday := barslast(cross(pma1,pma2));
vvday := barslast(cross(vma1,vma2));
MACDday := barslast(cross(diff,dea));
sjcjd:= if((ppday<=nday
and vvday<=nday
and macdday<=nday)
and (diff<0.2),1,0);
STICKLINE(sjcjd,0.5,-0.5,6,0),colorred,linethick2;
MACD: 2*(diff-dea), COLORSTICK;
pp1day := barslast(cross(pma2,pma1));
vv1day := barslast(cross(vma2,vma1));
macd1day := barslast(cross(dea,diff));
sjcjd1:= if((pp1day<=nday
and vv1day<=nday
and macd1day<=nday)
and (diff>0.2),1,0);
STICKLINE(sjcjd1,0.5,-0.5,6,0),colorwhite,linethick2;