DIF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG);
DEA : EMA(DIF,M);
MACD : 2*(DIF-DEA),colorwhite,LINETHICK2;
D1:=EMA(C,3)-EMA(C,8);
D2:=EMA(O,3)-EMA(O,8);
D3:=EMA(H,3)-EMA(H,8);
D4:=EMA(L,3)-EMA(L,8);
DRAWICON(CROSS(D1,DIF) AND DIF<-0.05 ,D4-0.1,1);
DRAWICON(CROSS(DIF,D1) AND DIF>0.1 ,D3+0.1,2);
STICKLINE(D1>=D2,D1,D2,8,0),COLOR0055AA;
STICKLINE(D1<=D2,D1,D2,8,0),COLOR006600;
STICKLINE(D1>=D2,D1,D2,5,0),COLOR0077CC;
STICKLINE(D1>=D2,D1,D2,3,0),COLOR0099DD;
STICKLINE(D1>=D2,D3,D4,0,0),COLOR00BBFF;
STICKLINE(D1<=D2,D1,D2,5,0),COLOR009900;
STICKLINE(D1<=D2,D1,D2,3,0),COLOR00BB00;
STICKLINE(D1<=D2,D3,D4,1,0),COLOR00EE00;
DRAWTEXT(CROSS(DIF,DEA),DIF,'');
DRAWTEXT(CROSS(DEA,DIF),DEA,'');
//{MACD柱线变色标识}
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,3,0),colorred;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,3,0),colorliblue;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,3,0),colormagenta;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,3,0),colorligreen;
//{DIF线变色标识}
多:IF(DIF>REF(DIF,1),DIF,DRAWNULL),colorred,LINETHICK2;
空:IF(DIF<REF(DIF,1),DIF,DRAWNULL),colorliblue,LINETHICK1;
{"均线系统";}
N1:=5;
N2:=10;
N3:=20;
N4:=30;
EMA7:=EMA(C,7);
BBI:=(MA(CLOSE,N1)+MA(CLOSE,N2)+MA(CLOSE,N3)+MA(CLOSE,N4))/4;
过渡:IF(BBI,0,DRAWNULL),colorwhite,LINETHICK2;
持股:IF(C>BBI AND BBI>REF(BBI,1),0,DRAWNULL), colormagenta,LINETHICK2;
持币:IF(C<=BBI AND BBI<=REF(BBI,1),0,DRAWNULL),colorgreen,LINETHICK2;
VAR1=HHV(VAR1,20);
多转空:=((((LLV(MACD,4)>0) AND (MACD<REF(MACD,1))) AND (REF(MACD,1)>REF(MACD,2))) AND (REF(MACD,2)>REF(MACD,3)));
空转多:=((((HHV(MACD,4)<0) AND (MACD>REF(MACD,1))) AND (REF(MACD,1)<REF(MACD,2))) AND (REF(MACD,2)<REF(MACD,3)));
DRAWICON(多转空,MACD,2);
DRAWICON(空转多,MACD,1);
量能饱和度:IF((AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100>100,100,(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20))*100),NODRAW;
MA5偏离值:C/MA(C,5)-1,NODRAW;
gj:=MAX(C,O);
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,2,0),color0000ff;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,2,0),colorffff00;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,0),colorff00ff;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,2,0),color00ff00;
L4:=LLV(gj,4);
jl:=(HHV(dif,55)-LLV(dif,55))/5;
gt:=dea>REF(dea,1) AND REF(dea,1)<REF(dea,2);
A1:=BARSLAST(REF(gt,1));
底背离:=REF(L4,A1+1)>CLOSE AND dif>REF(dif,A1+1) AND gt;
DRAWLINE(A1=0,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWLINE(底背离,DEA,底背离,REF(DEA,A1),0),colorred,LINETHICK2;
DRAWTEXT(底背离,REF(DEA,A1)*1.18,' 底背离'),COLORFF00FF;
H4:=HHV(gj,4);
gt2:=dea<REF(dea,1) AND REF(dea,1)>REF(dea,2);
A2:=BARSLAST(REF(gt2,1));
顶背离:= REF(H4,A2+1)<H4 AND dif<REF(dif,A2+1) AND gt2;
DRAWLINE(A2=0 ,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWLINE(顶背离,DEA,顶背离,REF(DEA,A2),0),colorgreen,LINETHICK2;
DRAWTEXT(顶背离,REF(DEA,A2)*1.18,' 顶背离'),colorgreen;
AAA:=REF(CLOSE,1);
BBB:=SMA(MAX(CLOSE-AAA,0),5,1)/SMA(ABS(CLOSE-AAA),5,1)*1000;
HHH:=BBB-LLV(BBB,10);
SS:=(MA(HHH,2)*3+HHH*13)/16;
短线买点:=IF(SS>13,MA(SS,2),SS)/6;
短线出击:IF(CROSS(短线买点,1) AND (短线买点<30),10,0),colormagenta,LINETHICK3;
V1:= MA(CLOSE,5)=HHV(MA(CLOSE,5),20);
V2:= MA(CLOSE,5)>MA(CLOSE,20);
V3:= COUNT(MA(CLOSE,1)>REF(CLOSE,1),3)=3;
风险: IF(V1 AND V2 AND V3,30,0),LINETHICK0,STICK,COLOR00FF00;
V11:= MA(CLOSE,5)=HHV(MA(CLOSE,5),120);
V21:= MA(CLOSE,5)>MA(CLOSE,120);
V31:= COUNT(MA(CLOSE,1)>REF(CLOSE,1),3)=3;
风险1: IF(V11 AND V21 AND V31,60,0),LINETHICK0,STICK,COLORF0F000;
///
AAA:=REF(CLOSE,1);
BBB:=SMA(MAX(CLOSE-AAA,0),5,1)/SMA(ABS(CLOSE-AAA),5,1)*1000;
HHH:=BBB-LLV(BBB,10);
SS:=(MA(HHH,2)*3+HHH*13)/16;
短线买点:=IF(SS>13,MA(SS,2),SS)/6;
短线出击:IF(CROSS(短线买点,1) AND (短线买点<30),10,0),colormagenta,LINETHICK3;
|
评论内容只代表网友观点,与本站立场无关!
本网提供的公式文件说明:
* alg格式飞狐股票公式,可以用飞狐交易师或者交易师软件导入;
* fnc格式大智慧新一代公式指标,可以用大智慧股票软件使用,少部分可以用分析家股票软件引入使用;
* exp格式大智慧经典版股票公式,仅可以用大智慧经典版股票软件引入使用;
* tni和tnc格式通达信股票公式,仅可以用通达信新引入使用,例如可以用通达信股票软件引入使用;
* tne,tn6格式通达信公式,可以用通达信公式编辑器5.0版导入,推荐通达信金融终端版本;
* hxf格式同花顺股票公式,仅可以用同花顺股票软件引入使用。
以上的各种软件都可以在本网股票软件栏目找到!
* 关于股票公式时间限制,如果在引入大智慧公式,交易师公式或者飞狐公式的时候,发现公式名称栏是空白的,这时候调整电脑时间到1997年,又能出现公式名称,并且能正常显示,可能是公式使用期限已过。
* 关于还原公式源码如果你忘记了自己编写的大智慧公式,通达信公式,同花顺公式,操盘手公式,飞狐公式,博易大师公式,金字塔公式,文华公式和交易师公式等等公式的密码,本网可帮恢复源码,有.偿.服.务无意勿扰,点击在线咨询联系我。
* 关于股票公式源码编辑
本网提供的源码,一般都可以编辑成公式,如果不明白公式的编辑,在本页右侧教程录像可参考,或者找公式教程资料学习,请搜索:教程
* 如果您发现软件内容或者链接错误,请点击报告错误谢谢!
* 站内提供的所有软件包含源码均是由网上搜集,若侵犯了你的版权利益,请联系通知我们!