公式网 股票指标公式源码分享 登录 注册
公式指标平网
未来函数检测
首页 金钻指标 通达信公式 大智慧公式 同花顺公式 文华财经公式 东财通公式 飞狐公式 操盘手公式 其他公式 公式解答 股票软件 股票池
当前位置:→ 公式网 > 大智慧公式 > 正文 → 正文

由通达信改编过来的像似BOLL胜过BOLL的顶底买卖指标(主图.源码.附图)

发布时间:2013/12/5 4:40:56  浏览次数:

”嘲笑自己“同学在指标答疑区.提出来要把通达信的顶底买卖指标改成大智慧的.
他的源码如下:------------------------------------------------------------------
MMDDP1A:=IF(C>500,1.02,1.06);
MMDDP2A:=IF(C>500,0.96,0.9);
MMDDP3A:=IF(C>500,1.008,1.035);
MMDDP4A:=IF(C>500,0.987,0.965);
MMDDP1:=IF(HOUR!=0,MMDDP3A,MMDDP1A);
MMDDP2:=IF(HOUR!=0,MMDDP4A,MMDDP2A);
S:XMA((C+H+O+L)/4,12)*MMDDP1;
B:XMA((C+H+O+L)/4,32)*MMDDP2;
因为大智慧里没有【XMA】函数我的解答是:--------------------------------------------------
MMDDP1A:=IF(C>500,1.02,1.06);
MMDDP2A:=IF(C>500,0.96,0.9);
MMDDP3A:=IF(C>500,1.008,1.035);
MMDDP4A:=IF(C>500,0.987,0.965);
MMDDP1:=IF(HOUR<>0,MMDDP3A,MMDDP1A);
MMDDP2:=IF(HOUR<>0,MMDDP4A,MMDDP2A);
S:FORCAST((C+H+O+L)/4,12)*MMDDP1;
B:FORCAST((C+H+O+L)/4,32)*MMDDP2;
 

我进一步研究编辑一下.我觉得改编以后.一旦K线出轨以外.就会回到轨道线以内.起到提示买卖的信号的作用 所以原来叫【顶底买卖指标】是有道理的.现在我把我编辑的源码发给大家.  同时感谢”嘲笑自己“同学和【任我行2010】班长.  我仅仅起到借题发挥的作用而已. 只要大家用好能够不是【老坐过山车】比什么都好.-----------【refx.dll】需要放到大智慧文件里------------------------------
 

{出轨涨跌}
DRAWGBK(C,Strip(RGB(0,0,80),RGB(0,40,0),0));
{K线}
STICKLINE(CLOSE>=OPEN,OPEN,LOW,0.5,0 ),COLOR0000ff,LAYER0;
STICKLINE(CLOSE>=OPEN,CLOSE,HIGH,0.5,0 ),COLOR0000ff,LAYER0;
STICKLINE(CLOSE<OPEN,OPEN,LOW,0.5,0 ),COLOR00ff00,LAYER0;
STICKLINE(CLOSE<OPEN,CLOSE,HIGH,0.5,0 ),COLOR00ff00,LAYER0;

STICKLINE(open>=close ,close ,open,0,0 ),COLOR00FF00;
STICKLINE(open>=close ,close ,open,8,0 ),COLOR008800;
STICKLINE(open>=close ,close ,open,7,0 ),COLOR009900;
STICKLINE(open>=close ,close ,open,6,0 ),COLOR00AA00;
STICKLINE(open>=close ,close ,open,5,0 ),COLOR00BB00;
STICKLINE(open>=close ,close ,open,4,0 ),COLOR00CC00;
STICKLINE(open>=close ,close ,open,3,0 ),COLOR00DD00;
STICKLINE(open>=close ,close ,open,2,0 ),COLOR00EE00;
STICKLINE(open>=close ,close ,open,1,0 ),COLOR00FF00;

STICKLINE(close>open,close,open,0,0) ,COLORFFBBFF;
STICKLINE(close>open,close,open,8,0) ,COLORFF00FF;
STICKLINE(close>open,close,open,7,0) ,COLORFF22FF;
STICKLINE(close>open,close,open,6,0) ,COLORFF44FF;
STICKLINE(close>open,close,open,5,0) ,COLORFF66FF;
STICKLINE(close>open,close,open,4,0) ,COLORFF88FF;
STICKLINE(close>open,close,open,3,0) ,COLORFF99FF;
STICKLINE(close>open,close,open,2,0) ,COLORFFAAFF;
STICKLINE(close>open,close,open,1,0) ,COLORFFBBFF;
CC:=FORCAST(C,3);  OO:=FORCAST(O,3); HH:=FORCAST(H,3); LL:=FORCAST(L,3);
TYP:FORCAST(((2*CC+HH+LL)/4*0.618+CC*0.382),3),color00FFFF,LINETHICK0;
MAW:WMA(TYP,5),COLORFF50FF,linethick0;
partline(MAW,MAW>=ref(MAW,1),rgb(255,0,0),MAW<ref(MAW,1),rgb(0,250,0)),linethick3,LAYER0;

N:=12;
P:=HHVALL(BARPOS)-BARPOS+1;
VV:=TYP;
XMA1:=IF(P=1,"REFX@REFX"(MA(VV,N/2+1),N/2),
IF(P=2 AND N>1,"REFX@REFX"(MA(VV,N/2+2),N/2),
IF(P=3 AND N>4,"REFX@REFX"(MA(VV,N/2+3),N/2),
IF(P=4 AND N>6,"REFX@REFX"(MA(VV,N/2+4),N/2),
IF(P=5 AND N>8,"REFX@REFX"(MA(VV,N/2+5),N/2),
IF(P=6 AND N>10,"REFX@REFX"(MA(VV,N/2+6),N/2),
IF(P=7 AND N>12,"REFX@REFX"(MA(VV,N/2+7),N/2),
IF(P=8 AND N>14,"REFX@REFX"(MA(VV,N/2+8),N/2),
IF(P=9 AND N>16,"REFX@REFX"(MA(VV,N/2+9),N/2),
IF(P=10 AND N>18,"REFX@REFX"(MA(VV,N/2+10),N/2),
IF(P=11 AND N>20,"REFX@REFX"(MA(VV,N/2+11),N/2),
IF(P=12 AND N>22,"REFX@REFX"(MA(VV,N/2+12),N/2),
IF(P=13 AND N>24,"REFX@REFX"(MA(VV,N/2+13),N/2),
IF(P=14 AND N>26,"REFX@REFX"(MA(VV,N/2+14),N/2),
IF(P=15 AND N>28,"REFX@REFX"(MA(VV,N/2+15),N/2),
IF(P=16 AND N>30,"REFX@REFX"(MA(VV,N/2+16),N/2),
IF(P=17 AND N>32,"REFX@REFX"(MA(VV,N/2+17),N/2),
IF(P=18 AND N>34,"REFX@REFX"(MA(VV,N/2+18),N/2),
IF(P=19 AND N>36,"REFX@REFX"(MA(VV,N/2+19),N/2),
IF(P=20 AND N>38,"REFX@REFX"(MA(VV,N/2+20),N/2),
IF(P=21 AND N>40,"REFX@REFX"(MA(VV,N/2+21),N/2),
IF(P=22 AND N>42,"REFX@REFX"(MA(VV,N/2+22),N/2),
IF(P=23 AND N>44,"REFX@REFX"(MA(VV,N/2+23),N/2),
IF(P=24 AND N>46,"REFX@REFX"(MA(VV,N/2+24),N/2),"REFX@REFX"(MA(VV,N),(N+1)/2-1)))))))))))))))))))))))));
M:=32;
XMA2:=IF(P=1,"REFX@REFX"(MA(VV,M/2+1),M/2),
IF(P=2 AND M>1,"REFX@REFX"(MA(VV,M/2+2),M/2),
IF(P=3 AND M>4,"REFX@REFX"(MA(VV,M/2+3),M/2),
IF(P=4 AND M>6,"REFX@REFX"(MA(VV,M/2+4),M/2),
IF(P=5 AND M>8,"REFX@REFX"(MA(VV,M/2+5),M/2),
IF(P=6 AND M>10,"REFX@REFX"(MA(VV,M/2+6),M/2),
IF(P=7 AND M>12,"REFX@REFX"(MA(VV,M/2+7),M/2),
IF(P=8 AND M>14,"REFX@REFX"(MA(VV,M/2+8),M/2),
IF(P=9 AND M>16,"REFX@REFX"(MA(VV,M/2+9),M/2),
IF(P=10 AND M>18,"REFX@REFX"(MA(VV,M/2+10),M/2),
IF(P=11 AND M>20,"REFX@REFX"(MA(VV,M/2+11),M/2),
IF(P=12 AND M>22,"REFX@REFX"(MA(VV,M/2+12),M/2),
IF(P=13 AND M>24,"REFX@REFX"(MA(VV,M/2+13),M/2),
IF(P=14 AND M>26,"REFX@REFX"(MA(VV,M/2+14),M/2),
IF(P=15 AND M>28,"REFX@REFX"(MA(VV,M/2+15),M/2),
IF(P=16 AND M>30,"REFX@REFX"(MA(VV,M/2+16),M/2),
IF(P=17 AND M>32,"REFX@REFX"(MA(VV,M/2+17),M/2),
IF(P=18 AND M>34,"REFX@REFX"(MA(VV,M/2+18),M/2),
IF(P=19 AND M>36,"REFX@REFX"(MA(VV,M/2+19),M/2),
IF(P=20 AND M>38,"REFX@REFX"(MA(VV,M/2+20),M/2),
IF(P=21 AND M>40,"REFX@REFX"(MA(VV,M/2+21),M/2),
IF(P=22 AND M>42,"REFX@REFX"(MA(VV,M/2+22),M/2),
IF(P=23 AND M>44,"REFX@REFX"(MA(VV,M/2+23),M/2),
IF(P=24 AND M>46,"REFX@REFX"(MA(VV,M/2+24),M/2),"REFX@REFX"(MA(VV,M),(M+1)/2-1)))))))))))))))))))))))));
MMDDP1A:=IF(CC>500,1.02,1.06);
MMDDP2A:=IF(CC>500,0.96,0.9);
MMDDP3A:=IF(CC>500,1.008,1.035);
MMDDP4A:=IF(CC>500,0.987,0.965);
MMDDP1:=IF(HOUR<>0,MMDDP3A,MMDDP1A);
MMDDP2:=IF(HOUR<>0,MMDDP4A,MMDDP2A);
S:XMA1*MMDDP1,COLOR00ff00,LINETHICK2;
B:XMA2*MMDDP2,COLOR0099ff,DOTLINE;
PARTLINE(S ,S>ref(S,1) ,rgb(255,0,0)),LINETHICK3,LAYER0;
FILLRGN(S,B,S>B,RGB(30,30,30)),LAYER5;
STICKLINE(H>S,H ,H*1.003,9,0 ),COLOR00FFFF,LAYER0;{出轨信号};
STICKLINE(L<B,L ,L*0.996,9,0 ),COLOR00AAFF,LAYER0;{出轨信号};
TD:last(H>S),LINETHICK0,PRECIS0;
DRAWTEXT(H>S,H*1.02,''+(TD)+''),color00FFff,LAYER0;;{连续出轨的天数};
 

由通达信改编过来的像似BOLL胜过BOLL的顶底买卖指标(主图.源码.附图)

资源下载链接   资源大小:unknow

手机移动版 - 关于我们 - 联系我们 - 广告合作 - 下载声明 - 网站帮助 - 友情链接 - 网站地图 - TOP
湘ICP备09016573号-3 增值电信业务经营ICP许可证:湘B2-20210269 湘公网安备43108102000039号
Copyright © GSZX.COM.CN ,All Rights Reserved.
股票公式,股票指标,股票软件,股票知识