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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信黄金分割主图:大盘到了一个重要的阻力点 主图源码


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

以下是通达信黄金分割主图:大盘到了一个重要的阻力点 主图源码

{黄金分割}
N:=34;{你随意调整N的参数,看看效果如何:你可以发现更多级别的阻力和支撑点}
高:IF (HIGH>PEAK(1,N,1),HHV(HIGH,N),PEAK(1,N,1)),COLORGREEN;{最高价}
低:IF (LOW<TROUGH(2,N,1),LLV(LOW,N),TROUGH(2,N,1)),COLORMAGENTA;{最低价}
F0.191:(高-低)*0.191+低,DOTLINE,COLORMAGENTA;
F0.382:(高-低)*0.382+低,DOTLINE,COLORCYAN;
F0.500:(高-低)*0.500+低,DOTLINE,COLORWHITE;
F0.618:(高-低)*0.618+低,DOTLINE,COLORCYAN;
F0.809:(高-低)*0.809+低,DOTLINE,COLORYELLOW;
{黄金分割点位}
波谷↑:=TROUGHBARS(2,N,1);{波谷起涨位}
波峰↓:=PEAKBARS(1,N,1);{波峰起跌位}
ZHSJ:=IF(波峰↓<波谷↑,BACKSET(ISLASTBAR,波峰↓),IF(波谷↑<波峰↓,BACKSET(ISLASTBAR,波谷↑),0));
DRAWTEXT(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),高*1.003,'重要阻力')COLORGREEN;
DRAWTEXT(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.191*1.003,' 80.9%'),COLORYELLOW;
DRAWTEXT(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.382*1.003,' 61.8%'),COLORCYAN;
DRAWTEXT(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.500*1.003,' 50.0%'),COLORWHITE;
DRAWTEXT(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.618*1.003,' 38.2%'),COLORGREEN;
DRAWTEXT(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.809*1.003,' 19.1%'),COLORRED;
DRAWTEXT(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),低*1.003,' 近期低点')COLORRED;

DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),高,高)COLORGREEN;
DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.809,F0.809)COLORMAGENTA;
DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.618,F0.618)COLORCYAN;
DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.500,F0.500)COLORWHITE;
DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.382,F0.382)COLORCYAN;
DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.191,F0.191)COLORYELLOW;
DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),低,低)COLORRED;

DRAWTEXT(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),高*1.003,' 重要阻力')COLORGREEN;
DRAWTEXT(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.191*1.003,' 19.1%'),COLORRED;
DRAWTEXT(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.382*1.003,' 38.2%'),COLORGREEN;
DRAWTEXT(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.500*1.003,' 50.0%'),COLORWHITE;
DRAWTEXT(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.618*1.003,' 61.8%'),COLORCYAN;
DRAWTEXT(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.809*1.003,' 80.9%'),COLORYELLOW;
DRAWTEXT(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),低*1.003,' 近期低点')COLORRED;

DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),高,高)COLORGREEN;
DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.809,F0.809)COLORYELLOW;
DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.618,F0.618)COLORCYAN;
DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.500,F0.500)COLORWHITE;
DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.382,F0.382)COLORCYAN;
DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.191,F0.191)COLORMAGENTA;
DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),低,低)COLORRED;

MA21:MA(CLOSE,21)COLORLIMAGENTA,CROSSDOT;{布林中轨}
{UB:MA21+2*STD(CLOSE,21)COLORLIMAGENTA LINETHICK2;{布林上轨}
{LB:MA21-2*STD(CLOSE,21)COLORLIMAGENTA LINETHICK2;}{布林下轨}
IF(MA21<REF(MA21,5),MA21,DRAWNULL)COLORCYAN,CROSSDOT;






回复

举报

QQ|

GMT+8, 2024-11-17 03:31

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