相關標簽:
上傳一個大道至簡的
通達信日線
指標(其他分鐘線或周線也適用,但效果不及日線):APX:=(H+L+C)/3;
TR0:=MAX(H-L,MAX(ABS(H-REF(C,1)),ABS(L-REF(C,1))));
MF0:=C-REF(C,2);
MF1:=REF(MF0,1);
MF2:=REF(MF0,2);
DIRECT1:=BARSLAST(MF0>MF1 AND MF0>MF2);
DIRECT2:=BARSLAST(MF0<MF1 AND MF0<MF2);
DIRECT0:=IF(DIRECT1<DIRECT2,100,-100);
TBP:REF(REF(C,1)+IF(DIRECT0>50,MIN(MF0,MF1),MAX(MF0,MF1)),1);
多頭獲利:REF(IF(DIRECT0>50,APX*2-L,DRAWNULL),1),NODRAW;
多頭停損:REF(IF(DIRECT0>50,APX-TR0,DRAWNULL),1),NODRAW;
空頭回補:REF(IF(DIRECT0<-50,APX*2-H,DRAWNULL),1),NODRAW;
空頭停損:REF(IF(DIRECT0<-50,APX+TR0,DRAWNULL),1),NODRAW;DRAWTEXT_FIX(C>O,0.01,0.9,0,' www.kzuj.com.cn '),COLORRED;
DRAWTEXT_FIX(C>O,1,1,0,'
程序化交易模型'),COLORRED;