MA12:EMA(C,12);
MA21:EMA(C,21);
DRAWCOLORLINE(MA12>REF(MA12,1),MA12,COLORRED,COLORGREEN);
DRAWCOLORLINE(MA21>REF(MA21,1),MA21,COLORMAGENTA,COLORCYAN);
VERTLINE( CROSS((MA12>MA21),0.5),COLORRED);
VERTLINE( CROSS((MA12<MA21),0.5),COLORGREEN);
COND1:=EVERY(MA12<REF(MA21,1),4);
COND2:=EVERY(MA12>REF(MA21,1),4);
LL:=COND1&&COUNT(COND1,BARSLAST(COND2))=1;
HH:=COND2&&COUNT(COND2,BARSLAST(COND1))=1;
HHH:=BACKSET(LL,HHVBARS(H,BARSLAST(HH))+1);
LLL:=BACKSET(HH,LLVBARS(L,BARSLAST(LL))+1);
DRAWLINE1(HHH,H,LLL,L,0),COLORBLUE,LINETHICK2;
DRAWLINE1(LLL,L,HHH,H,0),COLORYELLOW,LINETHICK2;
这是文件WH6的原码,请尽改成盘立方的公式!谢谢! |