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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] K线波段走势非常清晰的主图指标--三角分割(源码、主图、贴图)


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-3-10 19:10:50
K线波段走势非常清晰的主图指标--三角分割(源码、主图、贴图)介绍

K线波段走势非常清晰的主图指标--三角分割(源码、主图、贴图)

错的主图,K线走势非常清晰!不过有未来函数,喜欢的就用,非喜勿用!
一品茶缘编写的,推荐大家试试!

源码:

{三角分割}
N:=10;P:=60;
趋势:ZIG(3,N);
↑:TROUGHBARS(3,N,1),COLOR0000FF,NODRAW;
↓:PEAKBARS(3,N,1),COLOR00FF00,NODRAW;
低:IF(↑=0,C,IF(↓<↑,TROUGH(3,N,1),REF(TROUGH(3,N,1),1))),COLOR00FFFF,NODRAW;
涨%:IF(↑<↓,(C/低-1)*100,REF((C/低-1)*100,↓)),COLOR0000FF,NODRAW;
高:IF(↓=0,C,IF(↑<↓,PEAK(3,N,1),REF(PEAK(3,N,1),1))),COLOR00FF00,NODRAW;
跌%:IF(↓<↑,(C/高-1)*100,REF((C/高-1)*100,↑)),COLORFFFF00,NODRAW;

{以下设置主图显示方式}
上:IF(趋势>REF(趋势,1),趋势,DRAWNULL),COLORRED,LINETHICK2;
下:IF(趋势<REF(趋势,1),趋势,DRAWNULL),COLORGREEN,LINETHICK2;
STICKLINE(↑=0,H*1.01,高,0,0),COLOR00FF00;
STICKLINE(↓=0,L*0.99,低,0,0),COLORFF00FF;
STICKLINE(BETWEEN(↑,0,7),低,低,3,1),COLOR00FFFF;
STICKLINE(BETWEEN(↓,0,7),高,高,3,1),COLOR00FF00;
STICKLINE(↑<↓,低,低,1,1),COLOR00FFFF;
STICKLINE(↓<↑,高,高,1,1),COLOR00FF00;

{以下设置黄金分割}
KJ:=高-低;
H1:高-KJ*0.191,COLOR00FFFF,NODRAW;
H2:高-KJ*0.382,COLOR0000FF,NODRAW;
H3:高-KJ*0.500,COLORFFFFFF,NODRAW;
H4:高-KJ*0.618,COLORFF00FF,NODRAW;
H5:高-KJ*0.809,COLOR00FF00,NODRAW;
STICKLINE(↑<↓ AND ↑>0 AND 趋势<高,高,高,1,1),COLOR00FF00;
STICKLINE(↑<↓ AND ↑>0 AND 趋势<H1,H1,H1,1,1),COLOR00FF00;
STICKLINE(↑<↓ AND ↑>0 AND 趋势<H2,H2,H2,1,1),COLOR00FF00;
STICKLINE(↑<↓ AND ↑>0 AND 趋势<H3,H3,H3,1,1),COLORFFFFFF;
STICKLINE(↑<↓ AND ↑>0 AND 趋势<H4,H4,H4,1,1),COLOR00FF00;
STICKLINE(↑<↓ AND ↑>0 AND 趋势<H5,H5,H5,1,1),COLOR00FF00;
STICKLINE(↓<↑ AND ↓>0 AND 趋势>H1,H1,H1,1,1),COLORFF00FF;
STICKLINE(↓<↑ AND ↓>0 AND 趋势>H2,H2,H2,1,1),COLORFF00FF;
STICKLINE(↓<↑ AND ↓>0 AND 趋势>H3,H3,H3,1,1),COLORFFFFFF;
STICKLINE(↓<↑ AND ↓>0 AND 趋势>H4,H4,H4,1,1),COLORFF00FF;
STICKLINE(↓<↑ AND ↓>0 AND 趋势>H5,H5,H5,1,1),COLORFF00FF;
STICKLINE(↓<↑ AND ↓>0 AND 趋势>低,低,低,1,1),COLORFF00FF;
ZHSJ:=IF(↓<↑,BACKSET(ISLASTBAR,↓),IF(↑<↓,BACKSET(ISLASTBAR,↑),0));
DRAWTEXT(↓<↑ AND CROSS(ZHSJ,0.1),H1,'险'),COLOR00FFFF;
DRAWTEXT(↓<↑ AND CROSS(ZHSJ,0.1),H2,'高'),COLOR00FFFF;
DRAWTEXT(↓<↑ AND CROSS(ZHSJ,0.1),H3,'中'),COLOR00FF00;
DRAWTEXT(↓<↑ AND CROSS(ZHSJ,0.1),H4,'低'),COLOR00FFFF;
DRAWTEXT(↓<↑ AND CROSS(ZHSJ,0.1),H5,'支'),COLOR00FFFF;

DRAWTEXT(↓>↑ AND CROSS(ZHSJ,0.1),H1,'压'),COLORFFFFFF;
DRAWTEXT(↓>↑ AND CROSS(ZHSJ,0.1),H2,'高'),COLORFFFFFF;
DRAWTEXT(↓>↑ AND CROSS(ZHSJ,0.1),H3,'中'),COLOR0000FF;
DRAWTEXT(↓>↑ AND CROSS(ZHSJ,0.1),H4,'低'),COLORFFFFFF;
DRAWTEXT(↓>↑ AND CROSS(ZHSJ,0.1),H5,'弹'),COLORFFFFFF;
 


 




 



gd16253

回复

举报

QQ|

GMT+8, 2024-12-29 01:38

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