通达信神奇公式怎么选股通达信神奇布林线股票指标公式如下:mid2:=m

通达信神奇公式怎么选股通达信神奇布林线股票指标公式如下:mid2:=m,第1张

{神奇布林线主图}

MID2 := MA(CLOSE,21),COLORWHITE;

UPPER2:=MID2 + 196STD(CLOSE,21),COLORYELLOW;

LOWER2:=MID2 - 196STD(CLOSE,21),COLORYELLOW;

UP2:=MID2 + 256STD(CLOSE,21),COLORFF00FF;

LOOW2:=MID2 - 256STD(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),LOOW095,'开始建仓'),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,52,0),COLOR070084;}

STICKLINE((CLOSE > OPEN),CLOSE,OPEN,4,1),COLOR0000A3;

STICKLINE((CLOSE > OPEN),CLOSE,OPEN,35,0),COLOR000033;

STICKLINE((CLOSE > OPEN),CLOSE,OPEN,3,0),COLOR000066;

STICKLINE((CLOSE > OPEN),CLOSE,OPEN,20,0),COLOR000099;

STICKLINE((CLOSE > OPEN),CLOSE,OPEN,15,0),COLOR0000CC;

STICKLINE((CLOSE > OPEN),CLOSE,OPEN,10,0),COLOR0000FF;

STICKLINE((CLOSE > OPEN),CLOSE,OPEN,05,0),COLORCC66FF;

STICKLINE((CLOSE > OPEN),OPEN,LOW,03,0),COLORRED;

STICKLINE((CLOSE > OPEN),CLOSE,HIGH,03,0),COLORRED;

{STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,OPEN,52,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,35,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,20,0),COLOR0000E9;

STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,OPEN,15,0),COLOR0754E9;

STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,OPEN,10,0),COLOR076EF3;

STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,OPEN,05,0),COLOR077BF3;

STICKLINE((CLOSE = OPEN AND C>REF(C,1)),OPEN,LOW,03,0),COLOR0000CD;

STICKLINE((CLOSE = OPEN AND C>REF(C,1)),CLOSE,HIGH,03,0),COLOR0000CD;

{STICKLINE((OPEN > CLOSE),CLOSE,OPEN,52,0),COLORFF5B00;}

STICKLINE((OPEN > CLOSE),CLOSE,OPEN,4,1),COLORFF6C00;

STICKLINE((OPEN > CLOSE),CLOSE,OPEN,35,0),COLORFF7B00;

STICKLINE((OPEN > CLOSE),CLOSE,OPEN,2,0),COLORFF9C00;

STICKLINE((OPEN > CLOSE),CLOSE,OPEN,15,0),COLORFFBE00;

STICKLINE((OPEN > CLOSE),CLOSE,OPEN,1,0),COLORFFCC00;

STICKLINE((OPEN > CLOSE),CLOSE,OPEN,05,0),COLORFFFF00;

STICKLINE((OPEN > CLOSE),CLOSE,LOW,03,0),COLORFF9C00;

STICKLINE((OPEN > CLOSE),OPEN,HIGH,03,0),COLORFF9C00;

{STICKLINE((OPEN = CLOSE AND C<REF(C,1)),CLOSE,OPEN,52,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,35,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,15,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,05,0),COLORFFFF00;

STICKLINE((OPEN = CLOSE AND C<REF(C,1)),CLOSE,LOW,03,0),COLORFF9C00;

STICKLINE((OPEN = CLOSE AND C<REF(C,1)),OPEN,HIGH,03,0),COLORFF9C00;

====================

{选股}

MID := MA(CLOSE,21);

相离:=C-MID;

加仓:=C>=MID AND REF(相离,1)=LLV(相离,5);

股价多头:=C>MA(C,5) AND MA(C,5)>MA(C,10) AND MA(C,10)>MA(C,20);

开始建仓:=FILTER(股价多头,20);

XG:加仓 OR 开始建仓;

晕哦,这个用处大么?我不回编,但是我可以告诉你原理,取值以后乘以绿柱或者红烛的数量相加,中间要用到判断红绿柱的大小,就是diff和dea的大小。呵呵,正值和负值的区别。呵呵,希望有用。

用别人的

送你个自写的缠中说禅的macd指标

我编制的通达信公式是这样的:

参数:short 默认是12,范围你自己定(下同)

long默认是26;

mid默认是9;

K默认是0,范围0-1,0是显示均线面积,1是显示macd面积

MA1:=MA(CLOSE,5);

MA2:=MA(CLOSE,10);

DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);

DEA:=EMA(DIF,MID);

MACD:=(DIF-DEA)2,COLORSTICK;

DIFF:=SUM(MA1-MA2,0);

SUMMACD:=SUM(MACD,0);

W1:=BARSLAST(CROSS(MA2,MA1))+1;

W2:=BARSLAST(CROSS(MA1,MA2))+1;

W3:=BARSLAST(CROSS(MACD,0))+1;

W4:=BARSLAST(CROSS(-MACD,0))+1;

趋势力度:IF(K,SUMMACD-REF(SUMMACD,MIN(W3,W4)),DIFF-REF(DIFF,MIN(W1,W2)));

趋势平均力度:趋势力度/IF(K,(MIN(W3,W4)+1)/20,(MIN(W1,W2)+1)/20),COLORSTICK;

MAX趋势平均力度:HHV(趋势平均力度,34);

MIN趋势平均力度:LLV(趋势平均力度,34);

想看均线的面积你就把K调成0,趋势力度就指的均线的面积,平均力度就很明显了

想看macd的面积就把K调成1,趋势力度就指的是macd的面积了。

后面两个值是最近的趋势平均力度的最大最小值,后面的34你看着定,做成一个参数也成。

欢迎分享,转载请注明来源:表白网

原文地址:https://h5.hunlipic.com/biaobai/3139124.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2024-02-08
下一篇2024-02-08

发表评论

登录后才能评论

评论列表(0条)

    保存