这个做趋势最好  周期越大  效果越好。低周期如果震荡  那当然就会洗盘。建议日线周期操作。如果做股指  可以试试5分钟

源码

KK1:=SE;
KK2:=BU;
LM1:=SE*VAR1;
LM2:=BU*VAR1;
OK:=KK1>KK2 AND LM1>LM2;
OK1:=KK1>KK2 AND LM1<LM2;
NOK:=KK2>KK1 AND LM2>LM1;
NOK1:=KK2>KK1 AND LM2<LM1;
STICKLINE(OK1,CLOSE,OPEN,8,0),COLORFF00FF;
STICKLINE(OK1,HIGH,LOW,0,0),COLORFF00FF;
STICKLINE(OK,CLOSE,OPEN,8,0),COLORRED;
STICKLINE(OK,HIGH,LOW,0,0),COLORRED;
DRAWICON(OK AND NOT(REF(OK,1)),LOW-0.02,4);
DRAWICON(NOK AND NOT(REF(NOK,1)),HIGH+0.06,5);
DRAWTEXT(OK AND NOT(REF(OK,1)),LOW-0.02,’ 开多’);
DRAWTEXT(NOK AND NOT(REF(NOK,1)),HIGH+0.06,’ 开空’);
STICKLINE(NOK,CLOSE,OPEN,8,0),COLORFF0000;
STICKLINE(NOK,HIGH,LOW,0,0),COLORFF0000;
STICKLINE(NOK1,CLOSE,OPEN,8,0),COLORBLUE;
STICKLINE(NOK1,HIGH,LOW,0,0),COLORBLUE;
M1:=REF(MA(CLOSE,3),3);
M2:REF(MA(CLOSE,25),5),COLORBLUE;
止损止赢:IF(M1>M2,M2,M1),COLORRED;
PARTLINE(止损止赢>REF(止损止赢,1) AND 止损止赢=M2,止损止赢),LINETHICK2,COLORRED;
BK:=OK AND NOT(REF(OK,1));
SK:=NOK AND NOT(REF(NOK,1));
BIAS1 := (HIGH-REF(MA(CLOSE,25),5))/REF(MA(CLOSE,25),5)*100;
BIAS2 := (LOW-REF(MA(CLOSE,25),5))/REF(MA(CLOSE,25),5)*100;
BKT:=BARSLAST(BK);
SKT:=BARSLAST(SK);
SPP:=BKT<SKT AND BIAS1>=K1 AND REF(BIAS1,1)<K1;
BPP:=SKT<BKT AND BIAS2<=K2 AND REF(BIAS2,1)>K2;
SP:=SPP AND COUNT(SPP,BKT)=1;
BP:=BPP AND COUNT(BPP,SKT)=1;
DRAWICON(BP,LOW-0.02,8);
DRAWICON(SP,HIGH+0.06,9);


声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。