通达信精准的K线主图公式源码

 在刚才发的《色彩绚丽的五彩K线图》的思路上写的K线主图源码。下跌绿柱头上戴蓝帽是加速下跌或阴跌的信号!!!

通达信色彩绚丽的五彩K线图源码{原文链接:http://.cn/html/tongdaxingongshi/gs27759.html}


另:我的软件公式编辑器输出源码不能超过50条,所以~~~{}如果你们的编辑器足够大就把{}去掉,但现在也不影响使用,在这里希望
 
 


N1,N2,N3,N4:分别为:5,10,30,60。可根据自己喜欢进行设定,其实就是N天均线。

BBI:(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4;
MA(C,N1);MA(C,N2);MA(C,N3),LINETHICK2;MA(C,N4),COLORLIRED,LINETHICK2;
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
中:=(MA(CLOSE,30)+MA(C,72))/2,COLOR999999,LINETHICK0;
HLY1:=中*1.1,POINTDOT,COLOR999999,LINETHICK0;
VAR61:=(CLOSE*2+HIGH+LOW)/4;
VAR62:=EMA(VAR61,3);
VAR63:=EMA(VAR62,6);
L1:=EMA(VAR61,3),LINETHICK0;
L2:=EMA(VAR62,4),LINETHICK0;
L3:=EMA(VAR63,5),LINETHICK0;
{正常上涨}
STICKLINE(C>=O,H,L,0,0 ),COLOR0000FF; {红色}
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,3.2,0) ,COLOR000055;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,2.6,0) ,COLOR000077;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1.9,0) ,COLOR000099;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1.1,0) ,COLOR0000BB;
STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.2,0) ,COLOR0000FF;
{STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.2,0) ,COLOR0000EE;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.4,0) ,COLOR0000FF;}
{正常下跌}
STICKLINE(OPEN>=CLOSE,H,L,0,0 ),COLORFFFF00; {天蓝}
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3.2,0 ),COLORFF5500;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2.6,0 ),COLORFF7700;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.9,0 ),COLORFF9900;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.1,0 ),COLORFFBB00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.2,0 ),COLORFFDD00;
{STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.2,0 ),COLORFFEE00;
STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.4,0 ),COLORFFFF00;}
{整理下跌区}
{STICKLINE(L1<L2,H,LOW,0 ,0 ),COLORFFFFFF;{灰色}
{STICKLINE(L1<L2,CLOSE ,OPEN,3.0,0 ),COLOR555555;
STICKLINE(L1<L2,CLOSE ,OPEN,2.5,0 ),COLOR777777;
STICKLINE(L1<L2,CLOSE ,OPEN,1.9,0 ),COLOR999999;
STICKLINE(L1<L2,CLOSE ,OPEN,1.2,0 ),COLORBBBBBB;
STICKLINE(L1<L2,CLOSE ,OPEN,0.4,0 ),COLORDDDDDD;}
{STICKLINE(L1<L2,CLOSE ,OPEN,3,0 ),COLORFFEE00;
STICKLINE(L1<L2,CLOSE ,OPEN,2,0 ),COLORFFFF00;}
{下跌开始}
VAR44:=REF(L1,1)>L1 AND L1>L2;
STICKLINE(VAR44,H,LOW,0,0 ),COLORFF0000; {蓝色}
{STICKLINE(VAR44,CLOSE,OPEN,3.0,0) ,COLOR550000;
STICKLINE(VAR44,CLOSE,OPEN,2.5,0) ,COLOR660000;}
STICKLINE(VAR44,CLOSE,OPEN,3.2,0) ,COLOR660000;
STICKLINE(VAR44,CLOSE,OPEN,2.6,0) ,COLORAA0000;
STICKLINE(VAR44,CLOSE,OPEN,1.9,0) ,COLOREE1100;
STICKLINE(VAR44,CLOSE,OPEN,1.1,0) ,COLORFF3300;
STICKLINE(VAR44,CLOSE,OPEN,0.2,0) ,COLORFF5500;
{顶部钝化区}
STICKLINE((CLOSE >= HLY1),H,LOW,0 ,0),COLORFF00FF;{粉色}
STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,3.2,0),COLOR770077;
STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,2.6,0),COLORAA00AA;
STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,1.9,0),COLORDD00DD;
STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,1.1,0),COLORFF22FF;
STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,0.2,0),COLORFF66FF;
{STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,3,0),COLORFFDDFF;
STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,2,0),COLORFFEEFF;}
{单边下跌}
STICKLINE(买线<卖线,H,LOW,0,0 ),COLOR00FF00; {绿色}
STICKLINE(买线<卖线,CLOSE ,OPEN,3.2,0),COLOR004400;
STICKLINE(买线<卖线,CLOSE ,OPEN,2.6,0),COLOR005500;
STICKLINE(买线<卖线,CLOSE ,OPEN,1.9,0),COLOR007700;
STICKLINE(买线<卖线,CLOSE ,OPEN,1.1,0),COLOR009900;
STICKLINE(买线<卖线,CLOSE ,OPEN,0.2,0),COLOR00CC00;
{STICKLINE(买线<卖线,CLOSE ,OPEN,3,0),COLOR00DD00;
STICKLINE(买线<卖线,CLOSE ,OPEN,2,0),COLOR00FF00;}
{向上变盘}
STICKLINE(CROSS(买线,卖线),H,L,0,0),COLOR0033DD;{橘黄}
STICKLINE(CROSS(买线,卖线),C,OPEN,3.2,0),COLOR000077;
STICKLINE(CROSS(买线,卖线),C,OPEN,2.6,0),COLOR003399;
STICKLINE(CROSS(买线,卖线),C,OPEN,1.9,0),COLOR0033DD;
STICKLINE(CROSS(买线,卖线),C,OPEN,1.1,0),COLOR0055FF;
STICKLINE(CROSS(买线,卖线),C,OPEN,0.2,0),COLOR0099FF;
{向下变盘}
STICKLINE(CROSS(卖线,买线),H,L,0,0),COLOR00FFFF;{黄色}
STICKLINE(CROSS(卖线,买线),C,OPEN,3.2,0),COLOR008888;
STICKLINE(CROSS(卖线,买线),C,OPEN,2.6,0),COLOR00AAAA;
STICKLINE(CROSS(卖线,买线),C,OPEN,1.9,0),COLOR00CCCC;
STICKLINE(CROSS(卖线,买线),C,OPEN,1.1,0),COLOR00EEEE;
STICKLINE(CROSS(卖线,买线),C,OPEN,0.2,0),COLOR44FFFF;




来函数检测结果如下:
该公式没有未来函数

解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图