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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[大智慧] 「指标」由通达信改编过来的像似BOLL胜过BOLL的顶底买卖指标(主图.源码.附图)

 
    [-----复制链接-----]

22万

主题

22万

帖子

14

精华

积分
11042
楼主
2024-3-16 18:28:21
【资料名称】:由通达信改编过来的像似BOLL胜过BOLL的顶底买卖指标(主图.源码.附图)介绍
【资料描述】:

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

同学在指标答疑区.提出来要把通达信的顶底买卖指标改成大智慧的.
他的源码如下:------------------------------------------------------------------
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;
【任我行2010】班长利用【refx.dll】解决了在大智慧里替代【XMA】的问题.班长的公式源码和DLL文件都在他回复的压缩RAR里


我进一步研究编辑一下.我觉得改编以后.一旦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;;{连续出轨的天数};


 




 



gd31966


【下载地址隐藏】:                    点:回复可见地址
游客,如果您要查看本帖隐藏内容请回复






上一篇:「指标」分时图用的{涨停电眼}指标
下一篇:「指标」抓波段牛牛——牛股起飞选股指标(无未来函数)
回复

举报

QQ|

GMT+8, 2024-11-24 08:39

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