通达信涨跌幅区间买卖法则主图源码

 2023-10-14 11:21:04    通达信指标网  

{RQ1(1990,3000,2010),RQ2(1,12,1),RQ3(1,31,1),ZD(0,55,0),RQ3(0,3,0);}   

RQG:=(RQ1-1900)*10000+RQ2*100+RQ3;   

AH:REF(H,BARSLAST(DATE<=RQG )),NODRAW;   

高价:IF(DATE>=RQG,AH,DRAWNULL),COLORFFFF00;   

跌幅8%:IF(DATE>=RQG,AH*0.92,DRAWNULL),COLOR6094FF,LINETHICK3;   

跌幅18%:IF(DATE>=RQG,AH*0.82,DRAWNULL),COLOR6094FF,LINETHICK5;   

高价A:=IF(DATE>=RQG,AH*0.95,DRAWNULL);   

高价B:=IF(DATE>=RQG,AH*0.934,DRAWNULL);   

高价C:=IF(DATE>=RQG,AH*0.90,DRAWNULL);   

高价D:=IF(DATE>=RQG,AH*0.87,DRAWNULL);   

高价E:=IF(DATE>=RQG,AH*0.79,DRAWNULL);   

高价F:=IF(DATE>=RQG,AH*0.75,DRAWNULL);   

DRAWBAND(高价A,RGB(21,138,255),高价B,RGB(21,138,255));   

DRAWBAND(高价C,RGB(21,138,5),高价D,RGB(21,138,5));   

DRAWBAND(高价E,RGB(72,78,255),高价F,RGB(72,78,255));   

最低:=TROUGHBARS(L,ZD,1);   

低价:=REF(L,BARSLAST(最低=0));   

低价_:DRAWLINE(最低=0 AND ZD>0,L,ISLASTBAR,低价,0),COLORFFFF00;   

FU:=C-低价_;   

低到当前幅度:FU/低价_*100,NODRAW,COLOR00FFFF;   

FUGA:=高价-低价;   

高到低价幅度%:FUGA/高价*100,NODRAW,COLOR00FFFF;   

STICKLINE(C>=O,LOW,HIGH,0,0),COLOR0000FF;   

STICKLINE(C>=O,CLOSE,OPEN,3,0),COLOR1020EE;   

STICKLINE(C<=O,LOW,HIGH,0,0),COLORFF8800;   

STICKLINE(C<=O,CLOSE,OPEN,3,0),COLORFFCC00;   

_3%:DRAWLINE(最低=0 AND J>=1,L*1.03,ISLASTBAR,低价*1.03,0),COLOR999999;   

_5%:DRAWLINE(最低=0 AND J>=1,L*1.05,ISLASTBAR,低价*1.05,0),COLOR999999;   

_8%:DRAWLINE(最低=0 AND J>=1,L*1.08,ISLASTBAR,低价*1.08,0),COLOR999999;   

_13%:DRAWLINE(最低=0 AND J>=1,L*1.13,ISLASTBAR,低价*1.13,0),COLOR999999;   

_18%:DRAWLINE(最低=0 AND J>=2,L*1.18,ISLASTBAR,低价*1.18,0),COLOR999999;   

_25%:DRAWLINE(最低=0 AND J>=2,L*1.25,ISLASTBAR,低价*1.25,0),COLOR999999;   

DRAWNUMBER(最低=0 AND _3%,_3%,L*1.03),COLORFFFF00;   

DRAWTEXT(最低=0 AND _3%,_3%*1.009,'3%'),COLOR208FFF;   

DRAWNUMBER(最低=0 AND _5%,_5%,L*1.05),COLORFFFF00;   

DRAWTEXT(最低=0 AND _5%,_5%*1.009,'5%'),COLOR208FFF;   

DRAWNUMBER(最低=0 AND _8%,_8%,L*1.08),COLOR999999;   

DRAWTEXT(最低=0 AND _8%,_8%*1.009,'8%'),COLOR208FFF;   

DRAWNUMBER(最低=0 AND _13%,_13%,L*1.13),COLORFFFF00;   

DRAWTEXT(最低=0 AND _13%,_13%*1.009,'13%'),COLOR208FFF;   

DRAWNUMBER(最低=0 AND _18%,_18%,L*1.18),COLORFFFF00;   

DRAWTEXT(最低=0 AND _18%,_18%*1.009,'18%'),COLOR208FFF;   

DRAWNUMBER(最低=0 AND _25%,_25%,L*1.25),COLORFFFF00;   

DRAWTEXT(最低=0 AND _25%,_25%*1.009,'25%'),COLOR208FFF;   

DRAWNUMBER(ISLASTBAR AND 高价,AH*1.009,AH),COLORBBBBBB;   

LC := REF(CLOSE,1);   

RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;   

GB:IF(RSI1>76,H*1.001,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORFFFF00;   

GBB:IF(RSI1>80,H*1.002,DRAWNULL),CROSSDOT,LINETHICK3,COLOR0000FF;   

AS:=(O+H+L+C)/4;   

BL:EMA(AS,17),LINETHICK2,COLORFF6000;   

DRAWNUMBER(ISLASTBAR AND BL,BL*1.005,BL);   

XGM:=CROSS(C,BL);   

DRAWICON(XGM,BL,9);   

IF(BL>REF(BL,1),BL,DRAWNULL),LINETHICK2,COLORYELLOW;   

IF(BL<REF(BL,1),BL,DRAWNULL),LINETHICK2,COLOR00FF00;   

  

{请设置计算参数:   

年度: PARAM#0 显示年度   

月份: PARAM#1 显示月份   

日期: PARAM#2 显示日期   

ZD : PARAM#3 找近期低点   

J  : PARAM#4 显示涨幅幅度线}


  •  标签:  

原文链接:https://www.tdxzb.com/?id=1685

本文版权:如无特别标注,本站文章均为原创。

相关文章

服务热线

18020657357

微信客服

微信客服