股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信发现一个很好的波段买卖公式


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2023-10-9 12:09:50

以下是通达信发现一个很好的波段买卖公式

{MACD-金}
MA5:EMA(C,5),COLOR00FF00,DOTLINE;
IF(MA5>REF(MA5,1),MA5,DRAWNULL),COLOR0077FF,LINETHICK3;
DIF1:=WMA(CLOSE,5);
DIF2:=WMA(CLOSE,13);
MACD:WMA((3*DIF1-2*DIF2),2),COLORFF9900,DOTLINE;
IF(MACD>REF(MACD,1),MACD,DRAWNULL),COLORRED,LINETHICK3;

BC1E:=IF(L=LLV(L,8*20),L,DRAWNULL);
BC2E:=CONST(BARSLAST(BC1E=L))+1;
E:=CONST(IF(BC2E=1,L,REF(L,BC2E-1)));
DIFFK:=DIF1-DIF2;
DEAK:=WMA(DIFFK,8);
MACDK:=2*(DIFFK-DEAK);
STICKLINE(MACDK>0 AND MACDK>REF(MACDK,1),E+MACDK,E,2,0),COLOR0000FF;
STICKLINE(MACDK>0 AND MACDK<REF(MACDK,1),E+MACDK,E,2,0),COLORFF9900;
STICKLINE(MACDK<0,E+MACDK,E,2,0),COLORFF9900;

{高抛.低吸}
SJ:=WMA((C-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,2);
ZJ:=WMA(0.667*REF(SJ,1)+0.333*SJ,2);
DRAWTEXT(CROSS(SJ,ZJ) AND SJ<30,L-0.05,'←低吸'),COLOR00FF99,LINETHICK2;
DRAWTEXT(CROSS(ZJ,SJ) AND SJ>70,H+0.05,'←高抛'),COLOR0044FF,LINETHICK2;

TC1:=IF(H=HHV(H,8*14),H,DRAWNULL);
TC2:=CONST(BARSLAST(TC1=H))+1;
UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));
BC1:=IF(L=LLV(L,8*20),L,DRAWNULL);
BC2:=CONST(BARSLAST(BC1=L))+1;
LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));
LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低点定位}
HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;{高点定位};
STICKLINE(LP,L*0.992,L,13,0),COLORFF00FF;
STICKLINE(HP,H,H*1.005,13,0),COLOR00FF00;
X1:IF(CURRBARSCOUNT<=MAX(BC2,TC2),UPPER,DRAWNULL),COLOR89615F;
X2:IF(CURRBARSCOUNT<=MAX(BC2,TC2),LOWER,DRAWNULL),COLOR89615F;
X3:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPER-(UPPER-LOWER)*0.146,LOWER+(UPPER-LOWER)*0.146),DRAWNULL),COLOR89615F;
X4:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPER-(UPPER-LOWER)*0.191,LOWER+(UPPER-LOWER)*0.191),DRAWNULL),COLOR89615F;
X5:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPER-(UPPER-LOWER)*0.236,LOWER+(UPPER-LOWER)*0.236),DRAWNULL),COLOR89615F;
X6:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPER-(UPPER-LOWER)*0.382,LOWER+(UPPER-LOWER)*0.382),DRAWNULL),COLOR89615F;
X7:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPER-(UPPER-LOWER)*0.5,LOWER+(UPPER-LOWER)*0.5),DRAWNULL),COLOR89615F;
X8:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPER-(UPPER-LOWER)*0.618,LOWER+(UPPER-LOWER)*0.618),DRAWNULL),COLOR89615F;
X9:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPER-(UPPER-LOWER)*0.764,LOWER+(UPPER-LOWER)*0.764),DRAWNULL),COLOR89615F;
X10:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPER-(UPPER-LOWER)*0.809,LOWER+(UPPER-LOWER)*0.809),DRAWNULL),COLOR89615F;
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X1,'UPPER');
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X2,'LOWER');
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X3,'0.146');
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X4,'0.191');
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X5,'0.236');
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X6,'0.382');
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X7,'0.5');
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X8,'0.618');
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X9,'0.764');
DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X10,'0.809');

STICKLINE(CLOSE>= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;
STICKLINE(CLOSE>= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000066;
STICKLINE(CLOSE>= REF(CLOSE,1) ,OPEN,CLOSE,2.6,0 ),COLOR000099;
STICKLINE(CLOSE>= REF(CLOSE,1) ,OPEN,CLOSE,2,0 ),COLOR0000CC;
STICKLINE(CLOSE>= REF(CLOSE,1) ,OPEN,CLOSE,1.2,0 ),COLOR0000FF;
STICKLINE(CLOSE>= REF(CLOSE,1) ,OPEN,CLOSE,0.4,0 ),COLORCC66FF;
STICKLINE(CLOSE< REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLORCC0000;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2.6,0 ),COLORFF4400;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,2,0 ),COLORFF8800;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,1.2,0 ),COLORFFCC00;
STICKLINE(CLOSE< REF(CLOSE,1) ,OPEN,CLOSE,0.4,0 ),COLORCYAN;







回复

举报

QQ|

GMT+8, 2024-11-19 04:23

快速回复 返回顶部 返回列表