分享

通达信神奇布林线股票指标公式

 鈡吾 2016-07-01

mid2 := ma(close,21),colorwhite;
upper2:=mid2 + 1.96*std(close,21),coloryellow;
lower2:=mid2 - 1.96*std(close,21),coloryellow;
up2:=mid2 + 2.56*std(close,21),colorff00ff;
loow2:=mid2 - 2.56*std(close,21),colorff00ff;
{上升趋势}
stickline(c>=mid2,mid2,up2,2,0),color330066;
{下降趋势}
stickline(c<mid2,mid2,loow2,2,0),color545454;
mid:mid2,colorwhite;
upper:upper2,coloryellow;
up:up2,colorff00ff;
lower:lower2,coloryellow;
loow:loow2,colorff00ff;
开口:=up-loow;
相离:=c-mid;
drawtext(c>=mid and ref(开口,1)=hhv(开口,20),upper,'减仓'),color00ff00;
drawtext(c>=mid and ref(相离,1)=llv(相离,5),mid,'加仓');
股价多头:=c>ma(c,5) and ma(c,5)>ma(c,10) and ma(c,10)>ma(c,20);
drawtext(filter(股价多头,20),loow*0.95,'开始建仓'),colorred;
drawicon(filter(股价多头,20),lower,1),colorred;
drawtext(cross(mid,c),up,'空仓观望'),coloryellow;
drawicon(cross(mid,c),upper,2),coloryellow;

{k线}
{stickline((close > open),close,open,5.2,0),color070084;}
stickline((close > open),close,open,4,1),color0000a3;
stickline((close > open),close,open,3.5,0),color000033;
stickline((close > open),close,open,3,0),color000066;
stickline((close > open),close,open,2.0,0),color000099;
stickline((close > open),close,open,1.5,0),color0000cc;
stickline((close > open),close,open,1.0,0),color0000ff;
stickline((close > open),close,open,0.5,0),colorcc66ff;
stickline((close > open),open,low,0.3,0),colorred;
stickline((close > open),close,high,0.3,0),colorred;
{stickline((close = open and c>ref(c,1)),close,open,5.2,0),color070084;}
stickline((close = open and c>ref(c,1)),close,open,4,1),color0000a3;
stickline((close = open and c>ref(c,1)),close,open,3.5,0),color0000b7;
stickline((close = open and c>ref(c,1)),close,open,3,0),color0000cd;
stickline((close = open and c>ref(c,1)),close,open,2.0,0),color0000e9;
stickline((close = open and c>ref(c,1)),close,open,1.5,0),color0754e9;
stickline((close = open and c>ref(c,1)),close,open,1.0,0),color076ef3;
stickline((close = open and c>ref(c,1)),close,open,0.5,0),color077bf3;
stickline((close = open and c>ref(c,1)),open,low,0.3,0),color0000cd;
stickline((close = open and c>ref(c,1)),close,high,0.3,0),color0000cd;
{stickline((open > close),close,open,5.2,0),colorff5b00;}
stickline((open > close),close,open,4,1),colorff6c00;
stickline((open > close),close,open,3.5,0),colorff7b00;
stickline((open > close),close,open,2,0),colorff9c00;
stickline((open > close),close,open,1.5,0),colorffbe00;
stickline((open > close),close,open,1,0),colorffcc00;
stickline((open > close),close,open,0.5,0),colorffff00;
stickline((open > close),close,low,0.3,0),colorff9c00;
stickline((open > close),open,high,0.3,0),colorff9c00;
{stickline((open = close and c<ref(c,1)),close,open,5.2,0),colorff5b00;}
stickline((open = close and c<ref(c,1)),close,open,4,1),colorff6c00;
stickline((open = close and c<ref(c,1)),close,open,3.5,0),colorff7b00;
stickline((open = close and c<ref(c,1)),close,open,2,0),colorff9c00;
stickline((open = close and c<ref(c,1)),close,open,1.5,0),colorffbe00;
stickline((open = close and c<ref(c,1)),close,open,1,0),colorffcc00;
stickline((open = close and c<ref(c,1)),close,open,0.5,0),colorffff00;
stickline((open = close and c<ref(c,1)),close,low,0.3,0),colorff9c00;
stickline((open = close and c<ref(c,1)),open,high,0.3,0),colorff9c00;

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约