股票论坛

标题: 请老师帮优化下面的公式,谢谢!! [打印本页]

作者: 一与    时间: 2016-11-7 16:33
标题: 请老师帮优化下面的公式,谢谢!!
优化:当M20向上,出现钱袋时选股。

源码:

DRAWBAND(MA(CLOSE,5),RGB(100,0,0),MA(CLOSE,20),RGB(0,100,0));
DRAWKLINE(H,O,L,C);
PM:MA(C,5),COLORGRAY,LINETHICK1;{可用13}
IF(PM<REF(PM,1),PM,DRAWNULL),COLORGRAY,LINETHICK0;
IF(PM>=REF(PM,1),PM,DRAWNULL),COLORRED,LINETHICK2;
IF(PM=REF(PM,1),PM,DRAWNULL),COLORRED,LINETHICK2;
A:=MA(CLOSE,12)+ABS(MA(CLOSE,12)-REF(MA(CLOSE,12),1));{原公式为17,最终确定为12}
B:=MA(CLOSE,12)+MA(CLOSE,12)-REF(MA(CLOSE,12),1);
分水岭:=IF(MA(CLOSE,12)<B,B,MA(CLOSE,12));
操作线:=分水岭-(EMA(C,3)-分水岭);
AA:=CROSS(分水岭,操作线);
STICKLINE(AA,C,O,3,0),COLOR0000AA;
STICKLINE(AA,C,O,2,0),COLOR0033CC;
STICKLINE(AA,C,O,1,0),COLOR0055EE;
STICKLINE(AA,C,O,0.3,0),COLOR0099FF;
STICKLINE(AA,H,L,0,1),COLOR0099FF;
RR:=CROSS((MA(VOL,5)),(MA(VOL,10))) AND MA(C,2)>=MA(C,4); {AND VOL>=REF(VOL,1)}
STICKLINE(RR,C,O,3,0),COLOR0000AA;
STICKLINE(RR,C,O,2,0),COLOR0033CC;
STICKLINE(RR,C,O,1,0),COLOR0055EE;
STICKLINE(RR,C,O,0.3,0),COLOR0099EE;
STICKLINE(RR,H,L,0,1),COLOR0099FF;
MA5:MA(CLOSE,5),NODRAW;
MA20:MA(CLOSE,20),COLORFFCC66,LINETHICK2;
DRAWICON(CROSS(PM,MA20),L*0.9998,9);

选股:

PM:=MA(C,5);{可用13}
MA20:=MA(CLOSE,20);
DRAWICON(CROSS(PM,MA20),L*0.9998,9);

作者: 新人报道    时间: 2016-11-7 16:33
PM:=MA(C,5);{可用13}
MA20:=MA(CLOSE,20);
DRAWICON(CROSS(PM,MA20) AND MA20>REF(MA20,1),L*0.9998,9);




欢迎光临 股票论坛 (http://100000w.com/) Powered by Discuz! X3.2