咨詢內容:
請老師幫忙修改
N:=20;
T:=10;
M1:MA(C,N);
DRAWCOLORLINE(C>M1,M1,COLORRED,COLORGREEN),LINETHICK3;
HPB:=REF(HHV(H,N),1);
LPB:=REF(LLV(L,T),1);
{多頭交易}
BUYIN:=H>HPB AND C>M1;
BUYEXIT:=L<LPB;
SINGAL: =IF(BUYIN,1,IF(BUYEXIT,-1,0));
CURRSIGN: =REF(SINGAL ,BARSLAST(SINGAL));
UPTREND:=CURRSIGN= 1;
DWTREND:=CURRSIGN=-1;
{跟蹤止損}
空平:IF(DWTREND,HPB,NULL),COLORBLUE,LINETHICK2;
多止:IF(UPTREND,LPB,NULL),COLORRED,LINETHICK2;
信? 號? 持續:IF(DWTREND,BARSLAST(UPTREND),BARSLAST(DWTREND)),NODRAW,COL ORMAGENTA;
DRAWICON(BARSL AST(DWTREND)=1,多止,1);?
DRAWICON(BARSL AST(UPTREND)=1,空平,2);?
DRAWKLINE1(HIGH,OPEN,LOW,CLOSE);
?
?來源:程序化99網( www.kzuj.com.cn )
博易技術人員:
N:=20;
T:=10;
M1:MA(C,N);
PARTLINE2(M1,C>M1,COLORRED,C<M1,COLORGREEN),LINETHICK3;
HPB:=REF(HHV(H,N),1);
LPB:=REF(LLV(L,T),1);
{多頭交易}
BUYIN:=H>HPB AND C>M1;
BUYEXIT:=L<LPB;
SINGAL:=IF(BUYIN,1,IF(BUYEXIT,-1,0));
CURRSIGN:=REF(SINGAL ,BARSLAST(SINGAL));
UPTREND:=CURRSIGN= 1;
DWTREND:=CURRSIGN=-1;
{跟蹤止損}
空平:IF(DWTREND,HPB,DRAWNULL),COLORBLUE,LINETHICK2;
多止:IF(UPTREND,LPB,DRAWNULL),COLORRED,LINETHICK2;
信號持續:IF(DWTREND,BARSLAST(UPTREND),BARSLAST(DWTREND)),NODRAW,COLORMAGENTA;
DRAWICON(BARSLAST(DWTREND)=1,多止,1);?
DRAWICON(BARSLAST(UPTREND)=1,空平,2);?
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
來源 程序化久久網