首页 > 编程语言 >通达信极品MACD优化版副图指标公式源码

通达信极品MACD优化版副图指标公式源码

时间:2024-01-26 14:22:09浏览次数:44  
标签:EMA DIF 通达信 源码 CLOSE DEA REF MACD

该指标,简单实用,看盘必备指标
金叉在点阵下方时,尽量不要参与

 仅在点阵上方时,可大胆介入

 在点阵上方金叉的,涨势会非常顺滑
DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);
DIF:EMA(CLOSE,12)-EMA(CLOSE,26),LINETHICK2;
DEA:EMA(DIF,9),COLORWHITE;
MACD:(DIF-DEA)*2,NODRAW;

DRAWBAND(DIF,RGB(150,20,20),DEA,RGB(10,150,20));
DRAWBAND(IF(DIF,DIF,DRAWNULL),RGB(250,250,250),DIF,RGB(0,0,0));
DRAWBAND(IF(DEA,DEA,DRAWNULL),RGB(250,250,10),DEA,RGB(0,0,0));


STICKLINE(MACD>0,0,MACD,1,0),COLORRED;
STICKLINE(MACD<0,0,MACD,1,0),COLORGREEN;
STICKLINE(MACD>0 AND MACD<=REF(MACD,1),0,MACD,1,0),COLORYELLOW;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,1,0),COLORWHITE;
FH1:=REF(MACD,1)<ref(macd,2) and="" ref(macd,2)<ref(macd,3)="" ref(macd,3)<ref(macd,4);<br=""> FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
FH3:=FH1 AND FH2 AND EMA(C,13)>REF(EMA(C,13),1);
FH4:=FH1 AND FH2 AND ABS((DIF-DEA)/C)<0.018;
FH5:=FH1 AND FH2 AND MACD<0.10;
VV:=CLOSE>OPEN AND MA(CLOSE,5)>MA(CLOSE,10) AND MA(CLOSE,10)>MA(CLOSE,30)
AND DIFF>DEA AND MACD>REF(MACD,1) AND DIFF>0 AND DEA>0 AND
MA(VOL,5)>MA(VOL,34) AND MA(CLOSE,30)>=REF(MA(CLOSE,30),1);
佛手:IF(VV,1,0),NODRAW;
DRAWICON(佛手,0.06,11);
二次翻红:(FH3 OR FH4 OR FH5),COLORRED,NODRAW;
低买:CROSS(DIF,DEA) AND DIF<0,COLORFF00FF,NODRAW;
加油:CROSS(DIF,DEA) AND DIF>0,COLORYELLOW,NODRAW;
DRAWICON(二次翻红,-0.05,1);

DRAWTEXT(二次翻红,-0.15,'翻红'),COLORRED;
DRAWTEXT(CROSS(DIF,DEA) AND DIF<0,DEA-0.02,'低买'),COLORFF00FF;
DRAWTEXT(CROSS(DIF,DEA) AND DIF>0,DEA-0.05,'加油'),COLORYELLOW;
XG:二次翻红 OR 低买 OR 加油,NODRAW;
YLZC:=IF(CLOSE=INDEXC,(INDEXC+INDEXH+INDEXL+INDEXO)/4,AMOUNT/(VOL+0.01)/100);
阻价:=IF(CLOSE=INDEXC,YLZC+INDEXC-INDEXL,YLZC+(CLOSE-LOW));
支价:=IF(CLOSE=INDEXC,INDEXL+INDEXC-YLZC,LOW+(CLOSE-YLZC));
今压:REF(阻价,1),LINETHICK0,COLORAA11BB,NODRAW;
今撑:REF(支价,1),LINETHICK0,COLOR009900,NODRAW;
明压:阻价,LINETHICK0,NODRAW;
明撑:支价,LINETHICK0,NODRAW;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW;
DRAWTEXT(低位金叉,0.16,' 低位金叉'),COLORWHITE;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,0.06,6,0),COLORFF00FF;
DRAWICON(二次金叉,DEA*0.9,1) ;
DRAWTEXT(二次金叉,0.2,' 二次金叉'),COLORYELLOW;
B1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,B1+1)>CLOSE AND DIFF>REF(DIFF,B1+1) AND CROSS(DIFF,DEA);
STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;

DRAWTEXT(底背离,0.12,' 底背离'),COLORFF00FF;
B2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,B2+1)DIFF AND CROSS(DEA,DIFF);

DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.25,'三全项'),COLOR0000FF,LINETHICK2;

入1:IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK2;
入2:IF(DIF<ref(dif,1),dif,drawnull),color00ff00,linethick2;< p="">


E3:=EMA(DIF,3);
E5:=EMA(DIF,5);
E10:=EMA(DIF,10);
E20:=EMA(DIF,20);
E60:=EMA(DIF,60);
E120:=EMA(DIF,120);
E240:=EMA(DIF,240);
E480:=EMA(DIF,480);
E960:=EMA(DIF,960);
E1920:=EMA(DIF,1920);
EE:=(E3*3+E5*5+E10*10+E20*20+E60*60+E120*120+E240*240+E480*480+E960*960+E1920*1920)/3818;
EE1:=(E3*3+E5*5)/8;
EE2:=(E20*20+E60*60+E120*120+E240*240+E480*480)/920;
EE3:=(E3*3+E5*5+E10*10)/18;
CE1:=((((EE2+EE3)/2+DIF)/2+DIF)/2+DIF)/2;
TT:EE2*(1+0.01*344),CIRCLEDOT,COLOR0000FF;


标签:EMA,DIF,通达信,源码,CLOSE,DEA,REF,MACD
From: https://www.cnblogs.com/zhibiao/p/17989227

相关文章

  • 通达信许散主图指标公式源码
    X_1:=HHV(HIGH,20);X_2:=LLV(LOW,20);X_3:=REF((X_1/X_2-1)*100<=30,1);X_4:=CLOSE*vol;X_5:=Ema((expma(X_4,23)/EXPMA(VOL,23)+EXPMA(X_4,54)/EXPMA(VOL,54)+EXPMA(X_4,108)/EXPMA(VOL,108)+EXPMA(X_4,316)/EXPMA(VOL,316))/4,34);X_6:=1.0668*X_5;X_7:=crOSS(CLOS......
  • 通达信出击细选副图/选股预警指标源码
    出击信号是低位安全买点信号,细选比较激进,根据需要进行参考,指标源码,可以自行做选股公式。 X_1:=(3*CLOSE+LOW+OPEN+HIGH)/6;X_2:=(20*X_1+19*REF(X_1,1)+18*REF(X_1,2)+17*REF(X_1,3)+16*REF(X_1,4)+15*REF(X_1,5)+14*REF(X_1,6)+13*REF(X_1,7)+12*REF(X_1,8)+11*REF(X_1,9)+10......
  • 通达信强势狙击副图/选股公式 寻强股利器指标源码
    结合五日乖离率和均线角度做的选股,分享给大家,强势股的指标信号一般都有高收益高风险的特征,所以大家还需要谨慎使用。 AA05:=MA(C,5),COLOR0099CC;五日乖离率:=(C-AA05)/AA05*100;BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA......
  • 通达信金牛
    {n=60}      v1:=ma(vol,5);v2:=ma(vol,10);v3:=ma(vol,20); v4:=ma(vol,30);      vv:=v1>v2 and v2>v3 {and v3>v4};      a1:=ma(c,5);a2:=ma(c,10);a3:=ma(c,20);a4:=ma(c,30);a5:=ma(c,60);a6:=ma(c,120);      aa:=a1>a2 and a2>a3......
  • 通达信简单上下轨道指标公式源码副图
    VAR2:=MA(ADVANCE-DECLINE,3)/100;VAR3:=MA(CLOSE,5)*1.01;VAR4:=MA(OPEN,13)*1.01;VAR5:=(MA(HIGH,3)+MA(LOW,5)+MA(CLOSE,3)+MA(OPEN,3)+CLOSE+OPEN)/6+VAR2;VAR6:=IF(VAR4>VAR5,VAR4,VAR5);VAR7:=IF(VAR4<VAR5,VAR4,VAR5);VAR8:=3/100;下轨:MA(VAR7,5)*(1-VAR8......
  • 通达信近期底部(通达信)
    Var3:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;  Var4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;  Var5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;  Var6:=(Var3+Var4+Var5)/3;  Var7:=EMA(Var6,5);  指标: EMA(EMA(Var3,5),5)*3, COLORSTICK;  Var8:=IF......
  • 通达信点火星空指标公式源码副图
    2.5,COLORBLACK;X_1:=CLOSE/REF(CLOSE,1)>=1.0982ANDCLOSE/REF(CLOSE,1)<=1.102ORCLOSE/REF(CLOSE,1)>=1.1998;X_2:=IF(AMOUNT/CLOSE/(HHV(AMOUNT,20)/HHV(CLOSE,20))*100>100,100,AMOUNT/CLOSE/(HHV(AMOUNT,20)/HHV(CLOSE,20))*100);X_3:=100*(HHV(HIGH,6......
  • SAP dialog 自定义搜索帮助 案例+源码
    同之前的blog一样,新建一个9000的屏幕,元素清单配好ok_code即可前置准备准备一个屏幕,具体步骤和之前一样,这边也按步骤做一下状态栏因为这个只是用于搜索帮助的演示,所以不需要应用应用程序工具栏,只需要设置功能键方便返回测试即可标题9000程序PROCESSBEFOREOUTPUT.......
  • 如何获取微信的版本号详解【附完整源码】
    前两天群里有人问到这个问题,我想着在网上找个教程发给他,没想到这玩意还挺新鲜?网上基本上找不到实质性的回答...关于这个问题,其实挺简单的,微信的版本号其实就写在注册表中,读取它就完事了~打开注册列表找到【计算机\HKEY_CURRENT_USER\Software\Tencent\WeChat】,就看的到版本号......
  • Spring源码导入IDEA记录
    一、首先Spring源码是gradle搭建,gradle会和jdk版本、IDEA产生兼容问题参考【学不完@根本学不完】的文章:SpringBoot版本与Spring、java、maven、gradle版本对应汇总=>由于本地JDK是1.8对应Java8,按照尽可能看新版本查找=>对应表格里面gradle7.x二、gradle安装步骤gradle历......