最新更新 - 网站地图 -
您的当前位置:首页 > 股票公式 > 公式技巧 > 通达信上攻启动主图改为预警选股公式

通达信上攻启动主图改为预警选股公式

来源:网络 点击: 时间:2022-12-23 01:28:17

编写要求:

请老师把出现“上攻”和“启动”的时候做预警选股,信号分别用颜色区分,谢谢 源码: 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短支撑 AND {短支撑>REF(短支撑,1)}C>波段趋势 AND 波段趋势>REF(波段趋势,1),HIGH,LOW,0,0 ),COLORRED; STICKLINE(C短支撑 AND C>波段趋势{短支撑>REF(短支撑,1)} AND 波段趋势>REF(波段趋势,1) ,OPEN,CLOSE,3,0 ),COLOR0000AA; LC:=REF(CLOSE,1); RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100); FF:=EMA(CLOSE,3); MA15:=EMA(CLOSE,21); {顶背离:=CROSS(88,RSI) AND V>MA(V,33); DRAWTEXT(顶背离,H*1.02,'顶背离'),COLOR00FF00;} DRAWTEXT(IF(CROSS(69,SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100),1,0) AND C短支撑 AND C>走平支撑线 AND 短支撑>REF(短支撑,2)*0.995 AND 波段趋势>REF(波段趋势,1) AND C短支撑 AND C>走平支撑线 AND 短支撑>REF(短支撑,2)*0.995 AND 波段趋势>REF(波段趋势,1) AND C短支撑 AND {短支撑>REF(短支撑,1)}C>波段趋势 AND 波段趋势>REF(波段趋势,1) AND C短支撑 AND C>波段趋势{短支撑>REF(短支撑,1)} AND 波段趋势>REF(波段趋势,1) AND CREF(买进价,1) AND C>波段; {黄托底条件} 加码价:=((C-REF(MA(C,17),1))/18+MA(C,17))*1.004; 加码条件:=CROSS(C,加码价) AND 加码价>REF(加码价,1); TTR:=EMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),4); HD :=HIGH-REF(HIGH,1); LD :=REF(LOW,1)-LOW; DMP:=EMA(IF(HD>0 AND HD>LD,HD,0),4); DMM:=EMA(IF(LD>0 AND LD>HD,LD,0),4); PDI:=DMP*100/TTR; MDI:=DMM*100/TTR; ADX:=EMA(ABS(MDI-PDI)/(MDI+PDI)*100,1); ADXR:=EMA(ADX,1); DMI选股:=CROSS(PDI,MDI) AND ADXREF(C,1)*1.05; MID:=MA(CLOSE,17); 短线BBI:=MID + 1*STD(CLOSE,17); 短BBI追:=CROSS(C,短线BBI) AND C>REF(C,1)*1.04; 短线操盘:=REF(LLV(H*0.98,3),1); 波段操盘:=EMA(短线操盘,2); 短线支撑:=EMA(EMA((2*L+C)/3,5),10); 强弱分水岭:=MA(短线支撑,20); 双穿买点:=CROSS(C,波段操盘) AND CROSS(C,强弱分水岭) AND C>强弱分界线*1.015 AND 短支撑>REF(短支撑,1) AND C>强弱分界线; 白绿选股:=(((买进条件 AND 加码条件 AND C>REF(C,1)*1.025 ) OR (买进条件 AND C>REF(C,1)*1.047 AND C<波段*1.08) OR (加码条件 AND C>REF(C,1)*1.07 ) ) OR DMI选股 OR 短BBI追) AND REF(HHV(H,20),10)<强弱分水岭*1.20 AND C<强弱分水岭*1.13 AND C>强弱分界线; STICKLINE(白绿选股 OR 双穿买点,L*0.996,L*0.98,6,0),COLORYELLOW; STICKLINE( 短支撑<波段趋势 AND 波段趋势

解答:

?BB:=ABS((CLOSE+2*HIGH+LOW)/4-MA(CLOSE,17))/MA(CLOSE,17);

EE:=DMA(CLOSE,BB);

    Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号

    免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!

    Top