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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 目标预测主图公式 忽优一下 信则灵


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

以下是目标预测主图公式 忽优一下 信则灵

目标预测主图公式 忽优一下 信则灵

参数{ 十天 1 9999 20
目标线 0 1 1
缺口线 0 1 1}

源码

{缺口与涨停}
STICKLINE(L>REF(H,1) AND 缺口线=1,REF(H,1),L,6,-1),COLORYELLOW;
STICKLINE(H<REF(L,1) AND 缺口线=1,REF(L,1),H,6,0),COLORBLUE;
DRAWKLINE(H,O,L,C);
ZT:=CLOSE/REF(CLOSE,1)>=1.095;
STICKLINE(ZT AND 缺口线=1,O,C,-1,0),COLORRED;
{涨幅预测}
CURR:=CURRBARSCOUNT;
BCL:=CONST(FINDLOW(L,0,十天*10,1));
DTT:=CONST(BARSLAST(BCL=L))+1;
SXL:=CONST(IF(DTT=1,L,REF(L,DTT-1)));
GTHT:=IF(DTT,DTT,DRAWNULL);
底:=IF(CURR<=GTHT AND 目标线=1,SXL,DRAWNULL) ;
一:=IF(CURR<=GTHT AND 目标线=1,SXL*1.146,DRAWNULL);
二:=IF(CURR<=GTHT AND 目标线=1,SXL*1.191,DRAWNULL);
三:=IF(CURR<=GTHT AND 目标线=1,SXL*1.236,DRAWNULL);
四:=IF(CURR<=GTHT AND 目标线=1,SXL*1.382,DRAWNULL);
五:=IF(CURR<=GTHT AND 目标线=1,SXL*1.5,DRAWNULL);
六:=IF(CURR<=GTHT AND 目标线=1,SXL*1.618,DRAWNULL);
七:=IF(CURR<=GTHT AND 目标线=1,SXL*1.764,DRAWNULL);
八:=IF(CURR<=GTHT AND 目标线=1,SXL*1.809,DRAWNULL);
九:=IF(CURR<=GTHT AND 目标线=1,SXL*1.854,DRAWNULL);
十:=IF(CURR<=GTHT AND 目标线=1,SXL*2,DRAWNULL);
起点:=STRCAT(' BASE:  ',CON2STR(SXL,3));
一6:=STRCAT('19.1%:  ',CON2STR(SXL*1.191,2));
二6:=STRCAT('38.2%:  ',CON2STR(SXL*1.382,2));
三6:=STRCAT('50.0%:  ',CON2STR(SXL*1.5,2));
四6:=STRCAT('61.8%:  ',CON2STR(SXL*1.618,2));
五6:=STRCAT('80.9%:  ',CON2STR(SXL*1.819,2));
六6:=STRCAT('100 %:  ',CON2STR(SXL*2,2));
七6:=STRCAT('150 %:  ',CON2STR(SXL*2.5,2));
八6:=STRCAT('200 %:  ',CON2STR(SXL*3,2));
九6:=STRCAT('300 %:  ',CON2STR(SXL*4,2));
十6:=STRCAT('400 %:  ',CON2STR(SXL*5,2));
十一6:=STRCAT('500 %:  ',CON2STR(SXL*6,2));
最高涨幅%:(H-SXL)/SXL*100,NODRAW,COLORLIGRAY;
DRAWBAND(底,RGB(0,120,120),底,RGB(0,0,0));
DRAWBAND(一,RGB(0,0,0),一,RGB(0,0,0)),DOTLINE,COLOR666600;
DRAWBAND(二,RGB(0,120,120),二,RGB(0,0,0));
DRAWBAND(三,RGB(0,0,0),三,RGB(0,0,0)),DOTLINE,COLOR666600;
DRAWBAND(四,RGB(0,120,120),四,RGB(0,0,0));
DRAWBAND(五,RGB(0,120,120),五,RGB(0,0,0));
DRAWBAND(六,RGB(0,120,120),六,RGB(0,0,0));
DRAWBAND(七,RGB(0,0,0),七,RGB(0,0,0)),DOTLINE,COLOR666600;
DRAWBAND(八,RGB(0,120,120),八,RGB(0,0,0));
DRAWBAND(九,RGB(0,0,0),九,RGB(0,0,0)),DOTLINE,COLOR666600;
DRAWBAND(十,RGB(0,120,120),十,RGB(0,0,0));
XJ:=STRCAT('现价:',CON2STR(C,2));
ZF:=STRCAT(' 涨幅:',CON2STR(((C-SXL)/SXL)*100,2));
ZF1:=STRCAT(ZF,'%');XJZF:=STRCAT(XJ,ZF1);
DRAWTEXT_FIX(ISLASTBAR,0.18,0,0,XJZF),COLORLIGRAY;
DRAWTEXT(CURR=(GTHT) AND 目标线=1,底*1.015,STRCAT(' BASE ',CON2STR(SXL,2))),COLOR889900;
DRAWTEXT(CURR=GTHT AND 目标线=1,一*1.014,STRCAT('14.6% ',CON2STR(SXL*1.146,2))),COLOR889900;
DRAWTEXT(CURR=GTHT AND 目标线=1,二*1.013,STRCAT('19.1% ',CON2STR(SXL*1.191,2))),COLOR889900;
DRAWTEXT(CURR=GTHT AND 目标线=1,三*1.012,STRCAT('23.6% ',CON2STR(SXL*1.236,2))),COLOR889900;
DRAWTEXT(CURR=GTHT AND 目标线=1,四*1.011,STRCAT('38.2% ',CON2STR(SXL*1.382,2))),COLOR889900;
DRAWTEXT(CURR=GTHT AND 目标线=1,五*1.01,STRCAT('50.0% ',CON2STR(SXL*1.5,2))),COLOR889900;
DRAWTEXT(CURR=GTHT AND 目标线=1,六*1.01,STRCAT('61.8% ',CON2STR(SXL*1.628,2))),COLOR889900;
DRAWTEXT(CURR=GTHT AND 目标线=1,七*1.01,STRCAT('76.4% ',CON2STR(SXL*1.764,2))),COLOR889900;
DRAWTEXT(CURR=GTHT AND 目标线=1,八*1.01,STRCAT('80.9% ',CON2STR(SXL*1.809,2))),COLOR889900;
DRAWTEXT(CURR=GTHT AND 目标线=1,九*1.01,STRCAT('85.4% ',CON2STR(SXL*1.864,2))),COLOR889900;
DRAWTEXT(CURR=GTHT AND 目标线=1,十*1.01,STRCAT('100% ',CON2STR(十,2))),COLOR889900;
DRAWTEXT_FIX(ISLASTBAR ,0.0,0,0,'目标预测:'),COLORYELLOW;
DRAWTEXT(CURR=GTHT AND 目标线=0,L*1.015,' BASE'),COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR ,0.06,0.88,0,起点),COLORLIGRAY;
DRAWTEXT_FIX(ISLASTBAR ,0.06,0.80,0,一6),COLORLIGRAY;
DRAWTEXT_FIX(ISLASTBAR ,0.06,0.72,0,二6),COLORLIGRAY;
DRAWTEXT_FIX(ISLASTBAR ,0.06,0.64,0,三6),COLORLIGRAY;
DRAWTEXT_FIX(ISLASTBAR ,0.06,0.56,0,四6),COLORLIGRAY;
DRAWTEXT_FIX(ISLASTBAR ,0.06,0.48,0,五6),COLORLIGRAY;
DRAWTEXT_FIX(ISLASTBAR ,0.06,0.40,0,六6),COLORLIGRAY;
DRAWTEXT_FIX(ISLASTBAR ,0.06,0.32,0,七6),COLORLIGRAY;
DRAWTEXT_FIX(ISLASTBAR ,0.06,0.24,0,八6),COLORLIGRAY;
DRAWTEXT_FIX(ISLASTBAR ,0.06,0.16,0,九6),COLORLIGRAY;
DRAWTEXT_FIX(ISLASTBAR ,0.06,0.08,0,十6),COLORLIGRAY;
DRAWTEXT_FIX(ISLASTBAR ,0.06,0.0,0,十一6),COLORLIGRAY;





回复

举报

QQ|

GMT+8, 2024-11-27 17:46

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