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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信修订了一下量学三图叠加源码副图


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

以下是通达信修订了一下量学三图叠加源码副图

为了方便调整参数,整掉个人认为没用的,腾出空间大家可以加入自己其它的东东。如:底背离、三平顶底、极阴次阳过半、过全阴、峰谷线、K线的假阴假阳、高低倍平金帅将、零号不补、精准等等,我自己加了许多,背反不建议加了。

差点忘了,关于实顶、实底的问题,大家把指标中
最高:=HHV(H,N日最高); H改为MAX(O,C)
最低:=LLV(L,N日最低); L改为MIN(O,C)

已经改好的源码如下:

实体上三分之一:(MAX(O,C)-MIN(O,C))*2/3+MIN(O,C),COLORGREEN,NODRAW;

实体下三分之一:(MAX(O,C)-MIN(O,C))/3+MIN(O,C),NODRAW;

实体二分之一:(O+C)/2,NODRAW;

整体上三分之一:(MAX(H,L)-MIN(H,L))*2/3+MIN(H,L),NODRAW;

整体下三分之一:(MAX(H,L)-MIN(H,L))/3+MIN(H,L),COLORYELLOW,NODRAW;

整体二分之一:(H+L)/2,COLORLIMAGENTA,NODRAW;

STICKLINE(O<>C,实体上三分之一,实体下三分之一,2,0),COLOR824173;

STICKLINE(O<>C,实体二分之一,实体二分之一,2,0),COLORGREEN;

最高:=HHV(MAX(O,C),N日最高);

最低:=LLV(MIN(O,C),N日最低);

{股资源论坛WWW.88GS.COM}

上涨:BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(L=最低)+1)),COLOR0000FF,NODRAW;

↑空间%:(C/REF(L,上涨)-1)*100,COLOR00FFFF,NODRAW;

最高%:(最高/REF(L,上涨)-1)*100,COLORFF00FF,NODRAW;

下跌:BARSSINCE(BACKSET(ISLASTBAR,BARSLAST(H=最高)+1)),COLOR00FF00,NODRAW;

↓空间%:(C/REF(H,下跌)-1)*100,COLOR888899,NODRAW;

最低%:(最低/REF(H,下跌)-1)*100,COLORFF0000,NODRAW;

天线:REFDATE(REF(H,下跌),DATE),POINTDOT,LINETHICK3,COLORYELLOW;

地线:REFDATE(REF(L,上涨),DATE),POINTDOT,LINETHICK3,COLORYELLOW;

中线:REFDATE((天线-地线)*0.5+地线,DATE),POINTDOT,LINETHICK3,COLORYELLOW;

STICKLINE(上涨=0,天线,地线,0,-1),COLORYELLOW;

STICKLINE(下跌=0,天线,地线,0,-1),COLORYELLOW;

DRAWTEXT(ISLASTBAR,天线,VAR2STR(天线,2)),COLORYELLOW;

DRAWTEXT(ISLASTBAR,中线,VAR2STR(中线,2)),COLORYELLOW;

DRAWTEXT(ISLASTBAR,地线,VAR2STR(地线,2)),COLORYELLOW;

{2}

高:=天线;

低:=地线;

H2:=高-(高-低)*0.333;

H3:=高-(高-低)*0.5;

H4:=高-(高-低)*0.666;

DRAWTEXT(上涨=0,天线,'-最高'),COLOR0000FF;

DRAWTEXT(上涨=0,低,'-最低'),COLORRED;

DRAWTEXT(下跌=0,高,'-高'),COLORGREEN;

DRAWTEXT(下跌=0,地线,'-低'),COLOR00FF00;

DRAWTEXT(下跌=0,H2,'-0.666'),COLORGRAY;

DRAWTEXT(下跌=0,H3,'-中'),COLORYELLOW;

DRAWTEXT(下跌=0,H4,'-0.333'),COLORLIRED;

{股资源论坛WWW.88GS.COM}

DRAWTEXT(上涨=0,H2,'-上三一位'),COLORGRAY;

DRAWTEXT(上涨=0,H3,'-中'),COLORYELLOW;

DRAWTEXT(上涨=0,H4,'-下三一位'),COLORLIRED;

周期:CURRBARSCOUNT,NODRAW,COLORGREEN;

X_1:=REFX(HHV(MAX(OPEN,CLOSE),周期以内),周期-1);

X_2:=REFX(LLV(LOW,周期以内),周期-1);

X_3:=CLOSE/REF(CLOSE,1)<=1-大阴跌幅/100 AND OPEN>CLOSE AND DATE<=1181101;

X_4:=IF(周期以内=1,0.5,IF(周期以内=2,1,IF(周期以内=3,(-1),IF(周期以内=4,3,4))));

X_5:=0;

X_6:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1)),周期-1);

X_7:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_6)),周期-1);

X_8:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_7)),周期-1);

X_9:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_8)),周期-1);

X_10:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_9)),周期-1);

X_11:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_10)),周期-1);

X_12:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_11)),周期-1);

X_13:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_12)),周期-1);

X_14:=REFX(REF(OPEN,BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_13)),周期-1);

X_15:=REFX(BARSLAST(X_3 AND OPEN<X_1),周期-1)+1;

X_16:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_6),周期-1)+1;

X_17:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_7),周期-1)+1;

X_18:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_8),周期-1)+1;

X_19:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_9),周期-1)+1;

X_20:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_10),周期-1)+1;

X_21:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_11),周期-1)+1;

X_22:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_12),周期-1)+1;

X_23:=REFX(BARSLAST(X_3 AND OPEN<X_1 AND OPEN>X_13),周期-1)+1;

X_24:=IF(允许穿越=1,1,COUNT(MAX(OPEN,CLOSE)>X_6,X_15-周期)=0);

X_25:=IF(允许穿越=1,1,COUNT(MAX(OPEN,CLOSE)>X_7,X_16-周期)=0);

X_26:=IF(允许穿越=1,1,COUNT(MAX(OPEN,CLOSE)>X_8,X_17-周期)=0);

X_27:=IF(允许穿越=1,1,COUNT(MAX(OPEN,CLOSE)>X_9,X_18-周期)=0);

X_28:=IF(允许穿越=1,1,COUNT(MAX(OPEN,CLOSE)>X_10,X_19-周期)=0);

X_29:=IF(允许穿越=1,1,COUNT(MAX(OPEN,CLOSE)>X_11,X_20-周期)=0);

X_30:=IF(允许穿越=1,1,COUNT(MAX(OPEN,CLOSE)>X_12,X_21-周期)=0);

X_31:=IF(允许穿越=1,1,COUNT(MAX(OPEN,CLOSE)>X_13,X_22-周期)=0);

X_32:=IF(允许穿越=1,1,COUNT(MAX(OPEN,CLOSE)>X_14,X_23-周期)=0);

STICKLINE(周期<X_15 AND X_24,X_6,X_6,1,X_5),COLORLIGREEN;

STICKLINE(周期<X_16 AND X_25,X_7,X_7,1,X_5),COLORLIBLUE;

STICKLINE(周期<X_17 AND X_26,X_8,X_8,1,X_5),COLORLIGREEN;

STICKLINE(周期<X_18 AND X_27,X_9,X_9,1,X_5),COLORLIBLUE;

STICKLINE(周期<X_19 AND X_28,X_10,X_10,1,X_5),COLORLIGREEN;

STICKLINE(周期<X_20 AND X_29,X_11,X_11,1,X_5),COLORLIBLUE;

STICKLINE(周期<X_21 AND X_30,X_12,X_12,1,X_5),COLORLIGREEN;

STICKLINE(周期<X_22 AND X_31,X_13,X_13,1,X_5),COLORLIBLUE;

STICKLINE(周期<X_23 AND X_32,X_14,X_14,1,X_5),COLORLIGREEN;

DRAWTEXT(ISLASTBAR,X_6,VAR2STR(X_6,2)),COLORLIRED;

DRAWTEXT(ISLASTBAR,X_7,VAR2STR(X_7,2)),COLORLIRED;

DRAWTEXT(ISLASTBAR,X_8,VAR2STR(X_8,2)),COLORLIRED;

DRAWTEXT(ISLASTBAR,X_9,VAR2STR(X_9,2)),COLORLIRED;

DRAWTEXT(ISLASTBAR,X_10,VAR2STR(X_10,2)),COLORLIRED;

DRAWTEXT(ISLASTBAR,X_11,VAR2STR(X_11,2)),COLORLIRED;

DRAWTEXT(ISLASTBAR,X_12,VAR2STR(X_12,2)),COLORLIRED;

DRAWTEXT(ISLASTBAR,X_13,VAR2STR(X_13,2)),COLORLIRED;

DRAWTEXT(ISLASTBAR,X_14,VAR2STR(X_14,2)),COLORLIRED;









回复

举报

QQ|

GMT+8, 2024-11-18 10:58

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