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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[同花顺] 同花顺彩色优化布林线副图指标 源码


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-3-29 12:02:48
同花顺彩色优化布林线副图指标 源码介绍

同花顺彩色优化布林线副图指标 源码

本指标在传统布林线的基础上做了优化改进。
增加了颜色显示,还有买卖点提示,进场、加仓、补仓、离场等信号。
指标的使用方法和普通的布林线一样。
看图操作即可。

BOLL:MA(CLOSE,20),colorred;
UPPER:BOLL+2*STD(CLOSE,20),COLOR808080,LINETHICK2;
LOWER:BOLL-2*STD(CLOSE,20),colorgreen,LINETHICK2;
BOLL1:=MA(CLOSE,65);
UPPER1:BOLL1+2*STD(CLOSE,65),colorwhite,POINTDOT;
LOWER1:BOLL1-2*STD(CLOSE,65),colorwhite,POINTDOT;
MA5:=MA(C,5),colorwhite;
MA18:=MA(CLOSE,18);
MA13:=MA(C,13),colorgreen;
VAR1:=C=HHV(C,4) AND REF(C,1)=LLV(C,4);
VAR2:=C=LLV(C,4) AND (REF(C,1)<REF(C,2) OR REF(C,1)<REF(C,3)) OR REF(C,1)=LLV(C,4) AND C<REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)=HHV(C,4) AND C<REF(C,1) OR REF(C,3)=LLV(C,4) AND C<REF(C,1) AND C<REF(C,2);
VAR3:=REF(C,1)=LLV(C,4) AND C>=REF(C,2) OR REF(C,2)=LLV(C,4) AND REF(C,1)<=REF(C,3) AND REF(C,2)<REF(C,4) AND C>=REF(C,1);
A:=(3*C+L+O+H)/6;
VAR4:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+
14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
CB:=EMA(VAR4,13);
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,3,0),COLOR0000FF;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.5,0),COLORCC66FF;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,3,0),COLORFF9900;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.5,0),COLORFFCC00;
STICKLINE(VAR1,C,(O+C)/2,3,0),COLORFF11FF;
STICKLINE(VAR1,C,(O+C)/2,0.5,0),COLORFFDDFF;
STICKLINE(VAR2,C,(O+C)/2,3,0),COLOR999999;
STICKLINE(VAR2,C,(O+C)/2,0.5,0),COLORFFBBFF;
STICKLINE(VAR3,O,(O+C)/2,3,0),COLOR00BB00;
STICKLINE(VAR3,O,(O+C)/2,0.5,0),COLOR00FF00;
卖:=HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX);
DRAWTEXT(FILTER(卖=1,1),HIGH*1.02,'卖'),colorgreen;
买:=LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2));
DRAWTEXT(FILTER(买=1,5),LOW-0.03,'买'),colorred;
加仓:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10;
DRAWTEXT(FILTER((CROSS(加仓,0) OR CROSS(CLOSE,CB)) AND 买=1,3),LOW-0.03,'加'),colorwhite;
跟:=MA18>=REF(MA18,3) AND CROSS(CLOSE,MA18);
DRAWTEXT(跟,LOW*0.96,'跟'),COLORCC66FF;
天:=CONST(HHV(H,120))*1+0.6;
地:=CONST(LLV(L,120))*1-0.6;
BIAS11:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS12:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
BIAS13:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
短跌BIAS:IF(BIAS11<=-6,0.6+地,地),colorblack,LINETHICK2;
中跌BIAS:IF(BIAS12<=-10,0.6+地,地),colorblue,LINETHICK2;
长跌BIAS:IF(BIAS13<=-16,0.6+地,地),colorred,LINETHICK2;
短涨BIAS:IF(BIAS11>=6,天,天+0.6),colorblack,LINETHICK2;
中涨BIAS:IF(BIAS12>=10,天,天+0.6),colorblue,LINETHICK2;
长涨BIAS:IF(BIAS13>=16,天,天+0.6),colorred,LINETHICK2;






gd47538

回复

举报

QQ|

GMT+8, 2024-11-18 18:45

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