编写要求:
请老师把出现“上攻”和“启动”的时候做预警选股,信号分别用颜色区分,谢谢
源码:
M:=8;
CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
BB:=ABS((CLOSE+2*HIGH+LOW)/4-MA(CLOSE,17))/MA(CLOSE,17);
DD:=DMA(CLOSE,CC);
EE:=DMA(CLOSE,BB);
低吸:=REF((1-3/100)*EE,2);
强弱分界线:EMA(低吸,7),LINETHICK2,COLORFF6C00;
DRAWTEXT(ISLASTBAR,强弱分界线,'【分界线】'),COLORRED;
启动上攻关注:0,COLOR00FFFF,NODRAW;
红K强势持股:0,COLORRED,NODRAW;
紫K反弹不贪:0,COLORFF0FFF,NODRAW;
蓝K卖出观望:0,COLORFF6C00,NODRAW;
分界线变红转强:强弱分界线,COLORRED,NODRAW;
高抛线:(1+M/100)*DD,COLOR00FF02;
高抛线不过减仓:高抛线,COLOR00FF00,NODRAW;
短支撑:EMA((LLV((C+L)/2,6)+LLV((C+L)/2,5)
+LLV((C+L)/2,4)+LLV((C+L)/2,3)+LLV((C+L)/2,2)+2*(C+L+H)/3)/7,4),COLORWHITE;
IF(强弱分界线>REF(强弱分界线,1)*0.999 ,强弱分界线,DRAWNULL),COLORRED,LINETHICK4;
IF(强弱分界线=REF(短支撑,2)*0.998 AND C>短支撑,短支撑,DRAWNULL),COLORRED,LINETHICK2;
涨幅:=(C-REF(C,1))/REF(C,1)*100;
走平支撑线:=LLV((HIGH+2*LOW+OPEN+CLOSE)/5*2.03-H,30)*1.006,COLORABFF40,LINETHICK2;
穿两线:=((CROSS(C,短支撑) AND CROSS(C,波段趋势)) OR (L<短支撑 AND C>波段趋势 AND 短支撑<波段趋势 ))
{ AND 短支撑>REF(短支撑,1)} AND C>REF(C,1)*1.02 AND (C-O>H-C) AND V>REF(V,1) AND (C>强弱分界线 OR C<强弱分界线 AND C>REF(C,1)*1.07);
DRAWTEXT(穿两线,L*0.985,'★上攻'),COLORRED;
STICKLINE(穿两线,H,C,0.1,1),COLORYELLOW,LINETHICK2;
STICKLINE(穿两线,O,C,4.2,1),COLORYELLOW,LINETHICK2;
STICKLINE(穿两线,O,L,0.1,1),COLORYELLOW,LINETHICK2;
探底回升:=((CROSS(C,短支撑) AND CROSS(C,强弱分界线)) OR (CROSS(C,短支撑) AND 短支撑<强弱分界线*1.07))
AND C>强弱分界线 AND 强弱分界线>REF(强弱分界线,1)*0.999 AND 强弱分界线REF(C,1)*1.02;
回档:=L<短支撑 AND L<强弱分界线 AND C>强弱分界线 AND 强弱分界线>REF(强弱分界线,1) AND C>REF(C,1)*1.02;
{上升中继条件}
EMA3:=EMA(C,3);
EMA13:=EMA(C,13);
上升中继:=BARSLAST(REF(CROSS(EMA13,EMA3),1)) AND CROSS(EMA3,EMA13) AND C>强弱分界线 AND 强弱分界线>REF(强弱分界线,1)*0.99 AND REF(涨幅,1)<4 AND (C-O>H-C);
DRAWTEXT(上升中继,L*0.98,'启动'),COLOR00FFFF;
双穿:=CROSS(C,强弱分界线) AND CROSS(C,短支撑) AND 强弱分界线>=REF(强弱分界线,1)*0.999 AND 短支撑>强弱分界线;
DRAWTEXT(双穿,L*0.98,'双穿'),COLORRED;
{STICKLINE(探底回升 OR 回档 ,H,L,0,1),COLOR00FF00;
STICKLINE(探底回升 OR 回档,O,C,3,1),COLOR00FF00;}
STICKLINE( C>短支撑 AND C>走平支撑线 AND 短支撑>REF(短支撑,2)*0.995 AND 波段趋势>REF(波段趋势,1) ,HIGH,LOW,0,1 ),COLORRED;
STICKLINE( C>短支撑 AND C>走平支撑线 AND 短支撑>REF(短支撑,2)*0.995 AND 波段趋势>REF(波段趋势,1),OPEN,CLOSE,3,1 ),COLOR0000CC;
STICKLINE(C 解答: ?BB:=ABS((CLOSE+2*HIGH+LOW)/4-MA(CLOSE,17))/MA(CLOSE,17); EE:=DMA(CLOSE,BB);
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!