通达信涨幅量尺主图 源码

[复制链接]
查看440 | 回复0 | 2022-7-24 08:57:13 | 显示全部楼层 |阅读模式

通达信涨幅量尺主图 源码

牛牛指标网提供:www.tdx001.com}

应朋友“老者弥坚 ”要求改到TDX不像飞狐好设。朋友们可进一步优化!!
草根 涨幅量尺(主图 源码 帖图)

 
{ ZZ:0 20 0 高B: 0 256 0 J:0 3 0 BLL:0 26 0 N1:0 256 0 }
AMOV:=VOL*(OPEN+CLOSE)/2;
成本价:SUM(AMOV,5)/SUM(VOL,5),LINETHICK1,COLOR209FFF;
TT3:=(CURRBARSCOUNT=6+1) AND 高B>0;
TT1:=(CURRBARSCOUNT=2+1);
BG:=REF(H,高B);
BH := HHV(BG,1);
BHG:=CONST(BH );
高价_:DRAWLINE(TT3, BHG, TT1, BHG, 1),COLOR67A2FA;
DRAWTEXT(ISLASTBAR AND 高B>0,高价_,'高点'),COLOR67A2FA;
FUG:=高价_-C;
高当前幅度:FUG/高价_*100,NODRAW,COLOR67A2FA;
最低:=TROUGHBARS(L,ZZ,1);{调整之字幅度找到低位起点}
低价:=REF(L,BARSLAST(最低=0));
低价_:DRAWLINE(最低=0 AND ZZ>0,L,ISLASTBAR,低价,0),COLORFFFF00;
FU:=C-低价_;
到当前幅度:FU/低价_*100,NODRAW,COLOR00FFFF;
DRAWTEXT(ISLASTBAR AND J=3, C, '← -到当前幅度%'),COLOR00EFFF;
DRAWTEXT(ISLASTBAR AND ZZ>0,低价_,'低点'),COLORFFFF00;
_3%:DRAWLINE(最低=0 AND J>=3,L*1.03,ISLASTBAR,低价*1.03,0),COLOR999999;
_5%:DRAWLINE(最低=0 AND J>=3,L*1.05,ISLASTBAR,低价*1.05,0),COLOR999999;
_8%:DRAWLINE(最低=0 AND J>=3,L*1.08,ISLASTBAR,低价*1.08,0),COLOR999999;
_13%:DRAWLINE(最低=0 AND J=3,L*1.13,ISLASTBAR,低价*1.13,0),COLOR999999;
_18%:DRAWLINE(最低=0 AND J=3,L*1.18,ISLASTBAR,低价*1.18,0),COLOR999999;
_25%:DRAWLINE(最低=0 AND J=3,L*1.25,ISLASTBAR,低价*1.25,0),COLOR999999;
DRAWTEXT(ISLASTBAR AND J>=3,_3%,'3%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND J>=3,_5%,'5%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND J>=3,_8%,'8%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND J=3,_13%,'13%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND J=3,_18%,'18%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND J=3,_25%,'25%'),COLOR208FFF;
AS:=(O+H+L+C)/4;
BL:EMA(AS,17),LINETHICK2,COLOR0000FF;
IF(BL>REF(BL,1),BL,DRAWNULL),LINETHICK2,COLORYELLOW;
IF(BL<REF(BL,1),BL,DRAWNULL),LINETHICK2,COLOR00FF00;
DRAWTEXT(ISLASTBAR AND BL>REF(BL,1),BL,' ↑E17'),COLOR00FFFF;
DRAWTEXT(ISLASTBAR AND BL<REF(BL,1),BL,' ↓E17'),COLOR00FF00;
BLS: BL+2.58*STDP(C,BLL),LINETHICK1,COLOR00FFFF;
BL2: BL+1.96*STDP(C,BLL),LINETHICK1,COLORFF00FF;
BL3: BL-1.96*STDP(C,BLL),LINETHICK1,COLORF0FF00;
BLX: BL-2.58*STDP(C,BLL),LINETHICK1,COLOR00FF00;
XGM:=CROSS(C,BL);
DRAWICON(XGM,BL,9);
FUZ:=L+((H-L)/2);FUS:=O+((C-O)/2); FUSY:=C+((O-C)/2);SSFU:=(FUZ+IF(C>O,FUS,FUSY))/2;
FUZ1:=L+((H-L)*0.333);FUS1:=O+((C-O)*0.333);FUS1Y:=C+((O-C)*0.333);SSFU1:=(FUZ1+IF(C>O,FUS1,FUS1Y))/2;
FUZ2:=L+((H-L)*0.667);FUS2:=O+((C-O)*0.677);FUS2Y:=C+((O-C)*0.667);SSFU2:=(FUZ2+IF(C>O,FUS2,FUS2Y))/2;
STICKLINE(C=C AND J=1,SSFU2,SSFU2,1.5,0),COLOR208FFF,LINETHICK1;
STICKLINE(C=C AND J=1,SSFU1,SSFU1,1.5,0),COLOR208FFF,LINETHICK1;
STICKLINE(C=C AND J=1,SSFU,SSFU,2.6,0),COLOR00FFFF,LINETHICK1;
STICKLINE(C=C AND J=1,IF(C>O,H-((H-C)/2),H-((H-O)/2)),IF(C>O,H-((H-C)/2),H-((H-O)/2)),0.5,0),COLOR00FFFF,LINETHICK1;
STICKLINE(C=C AND J=1,IF(C<O,L+((C-L)/2),L+((O-L)/2)),IF(C<O,L+((C-L)/2),L+((O-L)/2)),0.5,0),COLOR00FFFF,LINETHICK1;
BGD:=C=HHV(C,6),LINETHICK0;
BDD:=C=LLV(C,6),LINETHICK0;
N10:=BARSLAST(BGD);
N20:=BARSLAST(BDD);
高S:=IF(N10,REF(C,N10),REF(C,N10))*1.005,POINTDOT,COLOR00FF00;
低S:=IF(N20,REF(C,N20),REF(C,N20))*0.995,POINTDOT,COLORFF00FF;
STICKLINE(C>0 AND J=2,高S,高S,1,0),COLOR00FF00;
STICKLINE(C>0 AND J=2,低S,低S,1,0),COLORFF00FF;
MAA:MA(C,N1),COLOR00FF00;
DRAWTEXT(ISLASTBAR AND N1>0 AND MAA>REF(MAA,1),MAA,'↑'),COLOR00FF00;
DRAWTEXT(ISLASTBAR AND N1>0 AND MAA<REF(MAA,1),MAA,'↓'),COLOR00FF00;
LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
GB:IF(RSI1>76,H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORFFFF00;
GBB:IF(RSI1>80,H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLOR0000FF;
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA),;
GMB:IF(CROSS(DIFF,DEA) AND DIFF>0,L-0.05,DRAWNULL),CROSSDOT,LINETHICK3,COLOR00FFFF;
GMC:IF(CROSS(DIFF,DEA) AND DIFF<0,L-0.05,DRAWNULL),CROSSDOT,LINETHICK3,COLOR00FFFF;
DRAWTEXT(CROSS(DIFF,DEA) AND DIFF>0,L-0.14,'金叉> 0 '),COLORYELLOW;
DRAWTEXT(CROSS(DIFF,DEA) AND DIFF<0,L-0.14,'金叉> 0 '),COLORYELLOW;
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
GJD:IF(CROSS(K,D) AND K>20 AND D<50,L-0.09,DRAWNULL),CROSSDOT,LINETHICK3,COLORFF00FF;
DRAWTEXT(CROSS(K,D) AND K>20 AND D<50,L-0.19,'K>20 D<50 KD金叉 '),COLOREEAAEE;
{请设置计算参数:
ZZ: PARAM#0 (0.00--20.00)调整任意低点;
高B:PARAM#1 (0.00--255.00)取任意高点;
J:  PARAM#2 (0.00--3.00)显示分价线;
BLL:PARAM#3 (0.00--26.00)显示布林线;
N1: PARAM#4 (0.00--255.00)显示任意均线;
};
三楼的朋友
说的未来函数“TROUGHBARS”你看看在这下面里有影响吗?
高当前幅度:FUG/高价_*100,NODRAW,COLOR67A2FA;
最低:=TROUGHBARS(L,ZZ,1);{调整之字幅度找到低位起点}
低价:=REF(L,BARSLAST(最低=0));
低价_:DRAWLINE(最低=0 AND ZZ>0,L,ISLASTBAR,低价,0),COLORFFFF00;
FU:=C-低价_;
到当前幅度:FU/低价_*100,NODRAW,COLOR00FFFF;
DRAWTEXT(ISLASTBAR AND J=3, C, '← -到当前幅度%'),COLOR00EFFF;
DRAWTEXT(ISLASTBAR AND ZZ>0,低价_,'低点'),COLORFFFF00;
_3%:DRAWLINE(最低=0 AND J>=3,L*1.03,ISLASTBAR,低价*1.03,0),COLOR999999;
_5%:DRAWLINE(最低=0 AND J>=3,L*1.05,ISLASTBAR,低价*1.05,0),COLOR999999;
_8%:DRAWLINE(最低=0 AND J>=3,L*1.08,ISLASTBAR,低价*1.08,0),COLOR999999;
_13%:DRAWLINE(最低=0 AND J=3,L*1.13,ISLASTBAR,低价*1.13,0),COLOR999999;
_18%:DRAWLINE(最低=0 AND J=3,L*1.18,ISLASTBAR,低价*1.18,0),COLOR999999;
_25%:DRAWLINE(最低=0 AND J=3,L*1.25,ISLASTBAR,低价*1.25,0),COLOR999999;
DRAWTEXT(ISLASTBAR AND J>=3,_3%,'3%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND J>=3,_5%,'5%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND J>=3,_8%,'8%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND J=3,_13%,'13%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND J=3,_18%,'18%'),COLOR208FFF;
DRAWTEXT(ISLASTBAR AND J=3,_25%,'25%'),COLOR208FFF;
还有它并没影响整体,不要一看到“未来函数”就喊小心!你的看给的条件做什麽用。神经质了
 

1A7439491.gif

1A7439491.gif

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则