CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
//0RAWGBK(CURRBARSCOUNT=1,RGB(110,108,108),RGB(88,30,0,0,0);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2,COLORSTICK;
VA1:=HHVBARS(H,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD),REF(VA1,1)+2),);
DRAWLINE(VA2,H,REF(VA2,1),REF(H,1),1),COLORGREEN,DOT;
NOTEXT 前高A:=VA2;
VA3:=LLVBARS(L,BARSLAST(MACD>0)+1);
VA4:=CROSS(BACKSET(CROSS(MACD,0),REF(VA3,1)+2),);
NOTEXT 前低A:=VA4;
基准:=REFX1(SUM(VA2,0),10000);
前高4:=基准-4=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;
前高3:=基准-3=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;
前高2:=基准-2=SUM(VA2,0) AND VA2,COLORWHITE,NODRAW;
前高1:=基准-1=SUM(VA2,0) AND VA2,COLORYELLOW,NODRAW;
前高:=基准=SUM(VA2,0) AND VA2,COLORCYAN,NODRAW;
距离G1:=BARSLAST(前高1);
距离G2:=BARSLAST(前高2);
距离G3:=BARSLAST(前高3);
距离G4:=BARSLAST(前高4);
DRAWLINE(前高1,H,前高 AND H>=REF(H,距离G1),H,0),COLORYELLOW;
DRAWLINE(前高1,H,前高 AND H<REF(H,距离G1),H,0),COLORGREEN;
DRAWLINE(前高2,H,前高1 AND H>=REF(H,距离G2),H,0),COLORYELLOW;
DRAWLINE(前高2,H,前高1 AND H<REF(H,距离G2),H,0),COLORGREEN;
DRAWLINE(前高3,H,前高2 AND H>=REF(H,距离G3),H,0),COLORYELLOW;
DRAWLINE(前高3,H,前高2 AND H<REF(H,距离G3),H,0),COLORGREEN;
DRAWLINE(前高4,H,前高3 AND H>=REF(H,距离G4),H,0),COLORYELLOW;
DRAWLINE(前高4,H,前高3 AND H<REF(H,距离G4),H,0),COLORGREEN;
基准2:=REFX1(SUM(VA4,0),10000);
前低:=基准2=SUM(VA4,0) AND VA4;
前低1:=基准2-1=SUM(VA4,0) AND VA4;
前低2:=基准2-2=SUM(VA4,0) AND VA4;
前低3:=基准2-3=SU
期货软件指标文华财经指标公式源码期货指标 布林指标源码 来自淘豆网m.daumloan.com转载请标明出处.