通达信【股市罗盘】主图指标 信号简单而直接 源码

N:=20;

M1:=5;

BOLL:=MA(CLOSE,N);

UB:=BOLL+2*STD(CLOSE,N);

LB:=BOLL-2*STD(CLOSE,N);

MA1:=MA(CLOSE,M1);

显示仪表盘1:=1;

总涨幅周期:=350;

范围高A:=REFDATE(HHV(H,120),DATE)*1.05;

范围低A:=REFDATE(LLV(L,120),DATE)*0.95;

MA5:=MA(C,5),COLORCYAN,LINETHICK2,NODRAW,COLORWHITE;

MA24:=MA(C,24),COLORGREEN,LINETHICK2,NODRAW,COLORWHITE;

MA72:=MA(C,72),COLORRED,LINETHICK2,NODRAW,COLORWHITE;

MA200:=IF((MA(C,200)<=范围高A AND MA(C,200)>=范围低A) OR C>=MA(C,200),MA(C,200),DRAWNULL),COLORBLUE,LINETHICK2,NODRAW,COLORWHITE;



主升浪:=ISLASTBAR AND MA5>MA24 AND MA24>MA72 AND MA72>IF(MA200=DRAWNULL,0,MA200);

主浪回调:=ISLASTBAR AND MA24>MA5 AND MA5>MA72 AND MA72>IF(MA200=DRAWNULL,0,MA200);

主浪深调:=ISLASTBAR AND MA24>MA72 AND MA72>MA5 AND MA5>IF(MA200=DRAWNULL,0,MA200);

初升浪:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MAX(MA24,MA72) AND MA5>MA24 AND MA24>MA72;

底部反弹:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 AND MA72>MA24 AND MA5>MA24;

探底阶段:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 AND MA72>MA24 AND MA24>MA5;

观望:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24>MA72 AND C<MA72,MA72>MA200 AND C<MA200);

有牛:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C>=MA72,MA72<MA200 AND C>=MA200);

放弃:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C<MA72,MA72<MA200 AND C<MA200);

DRAWGBK(显示仪表盘1=1 AND 主升浪=0 AND 主浪回调=0 AND 主浪深调=0 AND 初升浪=0 AND 底部反弹=0 AND 探底阶段=0 AND 观望=0 AND 有牛=0 AND 放弃=0,0,0,0,'观望',0);

DRAWGBK(显示仪表盘1=1 AND 主升浪,0,0,0,'主升浪',0);

DRAWGBK(显示仪表盘1=1 AND 主浪回调,0,0,0,'主浪回调',0);

DRAWGBK(显示仪表盘1=1 AND 主浪深调,0,0,0,'主浪深调',0);

DRAWGBK(显示仪表盘1=1 AND 初升浪,0,0,0,'初升浪',0);

DRAWGBK(显示仪表盘1=1 AND 底部反弹,0,0,0,'底部反弹',0);

DRAWGBK(显示仪表盘1=1 AND 探底阶段,0,0,0,'探底阶段',0);

DRAWGBK(显示仪表盘1=1 AND 观望,0,0,0,'观望',0);

DRAWGBK(显示仪表盘1=1 AND 有牛,0,0,0,'有牛',0);

DRAWGBK(显示仪表盘1=1 AND 放弃,0,0,0,'放弃',0);



STICKLINE(C>O,C,O,3,0),COLOR0000AA;

STICKLINE(C>O,C,O,2.5,0),COLOR0000BB;

STICKLINE(C>O,C,O,1.5,0),COLOR0000CC;

STICKLINE(C>O,C,O,1,0),COLOR0000EE;

STICKLINE(C>O,H,L,0,0),COLOR0000FF;

STICKLINE(C<O,C,O,3,0),COLOR7B7B00;

STICKLINE(C<O,C,O,2.5,0),COLOR909000;

STICKLINE(C<O,C,O,1.5,0),COLORA8A800;

STICKLINE(C<O,C,O,1,0),COLORCECE00;

STICKLINE(C<O,H,L,0,0),COLORFFFF00;

STICKLINE(C=O,C,O,3,0),COLORWHITE;

STICKLINE(C=O,H,L,0,0),COLORWHITE;



高点位:=REFDATE(HHV(H,总涨幅周期),DATE);

低点位:=REFDATE(LLV(L,总涨幅周期),DATE);

低位价:=REF(L,BARSLAST(低点位=L)),COLORGREEN;

高位价:=REF(H,BARSLAST(高点位=H)),COLORRED,NODRAW;

曾最大涨幅:=(高位价-低位价)/低位价*100;

当前涨幅:=(C-低位价)/低位价*100;

ZFA:=CON2STR(CONST(曾最大涨幅),2);

ZFB:=CON2STR(CONST(当前涨幅),2);

ZFC:=STRCAT('【曾最大涨幅】:',ZFA);

ZFD:=STRCAT(ZFC,'%');

ZFE:=STRCAT(ZFD,'【当前总涨幅】:');

ZFF:=STRCAT(ZFE,ZFB);

ZFG:=STRCAT(ZFF,'%');

DRAWTEXT_FIX(ISLASTBAR,0,1,0,'▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇'),COLORRED;

DRAWTEXT_FIX(ISLASTBAR,0,1,0,ZFG),COLORYELLOW;



Z1:=STRCAT(DYBLOCK,' ');

Z2:=STRCAT(Z1,HYBLOCK);

Z3:=STRCAT(Z2,' ');

Z4:=STRCAT(Z3,GNBLOCK);

Z5:=STRCAT(Z4,' ');

Z6:=STRCAT(Z5,FGBLOCK);

{DRAWTEXT_FIX(ISLASTBAR,0.01,0.012,0,STRCAT(Z6,ZHBLOCK)),COLORCYAN; }



DRAWRECTREL(IF(CODELIKE('999999') OR CODELIKE('399001'),0,760),IF(CODELIKE('999999') OR CODELIKE('399001'),0,12),IF(CODELIKE('999999') OR CODELIKE('399001'),0,890),IF(CODELIKE('999999') OR CODELIKE('399001'),0,70),RGB(255,0,0));

DRAWRECTREL(IF(CODELIKE('999999') OR CODELIKE('399001'),0,760),IF(CODELIKE('999999') OR CODELIKE('399001'),0,12),IF(CODELIKE('999999') OR CODELIKE('399001'),0,890),IF(CODELIKE('999999') OR CODELIKE('399001'),0,70),IF(CONST(DYNAINFO(51))>=1,RGB(0,255,0),RGB(255,0,0)));

ACB1:=CON2STR(CONST(DYNAINFO(51)),2);

ACB2:=STRCAT('【 内外比:',ACB1);

ACB3:=STRCAT(ACB2,' 】');

DRAWTEXT_FIX(IF(CODELIKE('999999') OR CODELIKE('399001'),DRAWNULL,1),0.76,0.015,0,ACB3),COLORYELLOW;

DRAWTEXT_FIX(IF(CODELIKE('999999') OR CODELIKE('399001'),DRAWNULL,CONST(DYNAINFO(51))>=1),0.76,0.015,0,ACB3),COLORBLACK;



DRAWRECTREL(0,IF(显示仪表盘1=0,135,0),IF(显示仪表盘1=0,288,0),IF(显示仪表盘1=0,630,0),RGB(0,0,255));

DRAWTEXT_FIX(显示仪表盘1=0,0.08,0.16,0,'【 均线解盘 】'),COLORWHITE;

DRAWTEXT_FIX(显示仪表盘1=0,0,0.23,0,'主升浪:5>24>72>200 '),COLORWHITE;

DRAWTEXT_FIX(显示仪表盘1=0 AND ISLASTBAR AND MA5>MA24 AND MA24>MA72 AND MA72>MA200,0.238,0.23,0,'≡★≡'),COLORRED;

DRAWTEXT_FIX(显示仪表盘1=0,0,0.285,0,'主浪回调:24>5>72>200 '),COLORWHITE;

DRAWTEXT_FIX(显示仪表盘1=0 AND ISLASTBAR AND MA24>MA5 AND MA5>MA72 AND MA72>MA200,0.238,0.285,0,'≡★≡'),COLORRED;

DRAWTEXT_FIX(显示仪表盘1=0,0,0.34,0,'主浪深调:24>72>5>200 '),COLORWHITE;

DRAWTEXT_FIX(显示仪表盘1=0 AND ISLASTBAR AND MA24>MA72 AND MA72>MA5 AND MA5>MA200,0.238,0.34,0,'≡★≡'),COLORMAGENTA;

DRAWTEXT_FIX(显示仪表盘1=0,0,0.395,0,'初升浪:200>5>24>72'),COLORWHITE;

DRAWTEXT_FIX(显示仪表盘1=0 AND ISLASTBAR AND MA200>MAX(MA24,MA72) AND MA5>MA24 AND MA24>MA72,0.238,0.395,0,'≡★≡'),COLOR0080FF;

DRAWTEXT_FIX(显示仪表盘1=0,0,0.45,0,'底部反弹:200>72>5>24'),COLORWHITE;

DRAWTEXT_FIX(显示仪表盘1=0 AND ISLASTBAR AND MA200>MA72 AND MA72>MA24 AND MA5>MA24,0.238,0.45,0,'≡★≡'),COLORYELLOW;

DRAWTEXT_FIX(显示仪表盘1=0,0,0.51,0,'探底阶段:200>72>24>5'),COLORWHITE;

DRAWTEXT_FIX(显示仪表盘1=0 AND ISLASTBAR AND MA200>MA72 AND MA72>MA24 AND MA24>MA5,0.238,0.51,0,'≡★≡'),COLORGREEN;

DRAWTEXT_FIX(显示仪表盘1=0 AND ISLASTBAR AND MA72>MA200 AND C>=MA200,0,0.565,0,'▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇'),COLORRED;

DRAWTEXT_FIX(显示仪表盘1=0 AND ISLASTBAR AND MA72>MA200 AND C>=MA200,0,0.565,0,'牛市行情:72>200 C>200 牛市 ---'),COLORYELLOW;

DRAWTEXT_FIX(显示仪表盘1=0 AND ISLASTBAR AND MA72>MA200 AND C<MA200,0,0.565,0,'未知行情:72>200 C<200 观望 ---'),COLORWHITE;

DRAWTEXT_FIX(显示仪表盘1=0 AND ISLASTBAR AND MA72<MA200 AND C>=MA200,0,0.565,0,'▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇'),COLORMAGENTA;

DRAWTEXT_FIX(显示仪表盘1=0 AND ISLASTBAR AND MA72<MA200 AND C>=MA200,0,0.565,0,'初入牛市:72<200 C>200 牛到 ---'),COLORWHITE;

DRAWTEXT_FIX(显示仪表盘1=0 AND ISLASTBAR AND MA72<MA200 AND C<MA200,0,0.565,0,'▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇'),COLORGREEN;

DRAWTEXT_FIX(显示仪表盘1=0 AND ISLASTBAR AND MA72<MA200 AND C<MA200,0,0.565,0,'熊市行情:72<200 C<200 放弃 ---'),COLORBLACK;

UB1:BOLL+2*STD(CLOSE,N),LINETHICK1,COLORMAGENTA DOTLINE;

LB1:BOLL-2*STD(CLOSE,N),LINETHICK1,COLORYELLOW DOTLINE;



双轨线上强势:0,NODRAW,COLORRED;

双轨线下弱势:0,NODRAW,COLORFF9900;

把握疯牛卖点:0,NODRAW,COLORGREEN;

ABC1:=(HIGH+CLOSE)/2;

ABC2:=(LOW+OPEN)/2;

ABC3:=(HIGH+REF(HIGH,2)+REF(HIGH,3))/3;

ABC4:=(CLOSE+REF(CLOSE,2)+REF(CLOSE,3))/3;

强势线:EMA((ABC3+ABC4)/2,7),COLORRED,LINETHICK2;

支撑线:EMA((ABC2+REF(ABC2,2)+REF(ABC2,3))/3,7),COLORGREEN,LINETHICK2;

IF(强势线>REF(强势线,1),强势线,DRAWNULL),COLORRED,LINETHICK2;

IF(强势线<REF(强势线,1),强势线,DRAWNULL),COLORFF9900,LINETHICK3;

IF(支撑线>REF(支撑线,1)*0.997,支撑线,DRAWNULL),COLORRED,LINETHICK4;

IF(支撑线<REF(支撑线,1),支撑线,DRAWNULL),COLORFF9900,LINETHICK3;

ABC5:=DYNAINFO(17);

ABC6:=CLOSE/DYNAINFO(3)>=1.005 AND CLOSE/DYNAINFO(3)<=1.04;

ABC7:=CLOSE/DYNAINFO(3)>=1.005 AND CLOSE/DYNAINFO(3)>=1.05;

ABC8:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;

ABC9:=NAMELIKE(2286);

ABC10:=NAMELIKE(2287);

ABC11:=NAMELIKE(1031);

ABC12:=ABC9+ABC10+ABC11=0;

ABC13:=CLOSE>=HHV(HIGH,60) AND ABC7 AND ABC5<2 AND CLOSE/DYNAINFO(3)<9 AND ABC12;

ABC14:=REF(CLOSE,1);

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

ABC16:=CROSS(85,ABC15) AND ABC6;

ABC17:=CROSS(ABC15,80) AND ABC7 AND ABC5<2;

DRAWTEXT(ABC16,LOW*0.98,2288),COLORYELLOW;

DRAWTEXT(REF(ABC17,1)=1 AND CLOSE<OPEN,HIGH*1.035,2289),COLORGREEN;

DRAWTEXT(ABC17 AND CLOSE<OPEN,HIGH*1.02,2290),COLORGREEN;

DRAWTEXT(COUNT(ABC13,3)>=1 AND ABC8<2 AND CLOSE>强势线*1.12,HIGH*1.01,2291),COLORFF6C22;

DRAWICON(ABC16,强势线,1);

DRAWICON(REF(ABC17,1)=1 AND CLOSE<OPEN,HIGH*1.01,2);

ABC18:=CROSS(CLOSE,强势线) AND CROSS(CLOSE,支撑线) OR (支撑线>REF(支撑线,1) AND LOW<支撑线 AND CLOSE>强势线) OR REF(CROSS(CLOSE,支撑线),1)=1 AND CROSS(CLOSE,强势线);

ABC19:=CROSS(强势线,CLOSE) AND CROSS(支撑线,CLOSE) OR (CLOSE<支撑线 AND HIGH>强势线 OR (REF(HIGH,1)>强势线 AND CROSS(支撑线,CLOSE)));

STICKLINE(ABC18,OPEN,CLOSE,3.3,0),COLOR0055FF;

STICKLINE(ABC18,OPEN,CLOSE,3.3,0),COLOR0077FF;

STICKLINE(ABC18,OPEN,CLOSE,3,0),COLOR0099FF;

STICKLINE(ABC18,OPEN,CLOSE,2.2,0),COLOR00BBFF;

STICKLINE(ABC18,OPEN,CLOSE,1.5,0),COLOR00DDFF;

STICKLINE(ABC18,OPEN,CLOSE,0.4,0),COLORYELLOW;

DRAWTEXT(ABC18,LOW*0.965,2772),COLORWHITE;

DRAWICON(ABC18 ,LOW*0.98,9);


未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图