一、零轴下金叉和零轴上死叉的预警
MA5:MA(C,5);
MA10:MA(C,10);
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA);
CROSS(MA5,MA10)&&MAX(DIFF,DEA)<0,NOTICE('零轴下金叉');
CROSSDOWN(MA5,MA10)&&MIN(DIFF,DEA)>0,NOTICE('零轴上死叉');
二、KDJ中的J值低于0和高于100时发出预警
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1);
D:SMA(K,3,1);
J:3*K-2*D;
CROSSDOWN(J,0),NOTICE('J小于0');
CROSS(J,100),NOTICE('J大于100');