唐山信息港

飛狐MACD轉折價位指標公式

更新時間:2020-05-20 09:49

input: P(19,15,100), S(7,5,140), M(9,2,80);
{-----------------------☆功能開關------------------------}
{資金}
ZJ1:=DMA((H+L+C*2)/4,0.9); ZJ2:=V/((H-L)*2-ABS(C-O));
ZJ3:=IF(C>O,ZJ2*(H-L),IF(C<O,ZJ2*(H-O+(C-L)),V/2))+IF(C>O,0-ZJ2*(H-C+(O-L)),IF(C<O,0-ZJ2*(H-L),0-V/2));
ZJ4:=ZJ3/20/1.15;ZJ5:=ZJ4*0.55+REF(ZJ4,1)*0.33+REF(ZJ4,2)*0.22;ZJ6:=EMA(ZJ5,3);
{macd}
MJ_1 := EMA(CLOSE,S) - EMA(CLOSE,P);
MJ_2 := EMA(MJ_1,M);
MJ_3 := 2*(MJ_1-MJ_2);
MJ_4:=REVERSE(MJ_3)+2*WMA(WMA(MJ_3,1),5);
MJ_5:=3*MJ_4-2*SMA(MJ_4,2,1);
{形態}
低金:=CROSS(MJ_1,MJ_2) AND MJ_1<-0.1;{低金}
SA0:=COUNT(CROSS(MJ_1,MJ_2) AND MJ_2<0,21)=3;
零下二次金叉:=CROSS(MJ_3,0) and SA0;{零下二次金叉}
SA1:=COUNT(CROSS(MJ_1,MJ_2),BARSLAST(MJ_2>=0));
二金:=(CROSS(MJ_1,MJ_2) AND MJ_2<0 AND COUNT(SA1=2,21)=1)*2;{二次金叉}
SA2:=BARSLAST(REF(CROSS(MJ_1,MJ_2),1));
底背:=(REF(C,SA2+1)>C AND MJ_1>REF(MJ_1,SA2+1) AND CROSS(MJ_1,MJ_2))*3;{底背}
三全:=低金 AND 二金 AND 底背;
SA3:=BARSLAST(REF(CROSS(MJ_2,MJ_1),1));
頂背:=REF(C,SA3+1)<C AND REF(MJ_1,SA3+1)>MJ_1 AND CROSS(MJ_2,MJ_1);{頂背}
{信號}
M_C1:=EMA(C,5)/EMA(EMA(C,9),16)<=0.85 and c/ref(c,1)<1.05and c/ref(c,1)>0.905 and V/CAPITAL*100<5;
M_C2:=MIN(ref(C,2)*0.865,ref(c,13)*0.772); M_C3:=(C-M_C2)/C<0.03; 滿倉:=M_C1 and M_C3;
{估測轉折股價--未來}
X:=BarsLast(Backset(ISLASTBAR,1)=1)+1;
Z_1:=REF(MJ_2,1)+((M+1)/(2*(M-1)))*REF(MJ_3,1);
Z_2:=((P-1)*(S+1)*REF(EMA(C,P),1)-(P+1)*(S-1)*REF(EMA(C,S),1)+(S+1)*(P+1)*REF(MJ_1,1))/(2*P-2*S);
Z_3:=((P-1)*(S+1)*REF(EMA(C,P),1)-(P+1)*(S-1)*REF(EMA(C,S),1)+(S+1)*(P+1)*REF(MJ_2,1))/(2*P-2*S);
Z_4:=((P-1)*(S+1)*REF(EMA(C,P),1)-(P+1)*(S-1)*REF(EMA(C,S),1)+(S+1)*(P+1)*Z_1)/(2*P-2*S);
Y_1:=(MJ_2*X+((M+1)/(2*(M-1)))*MJ_3*X);
Y_2:=((P-1)*(S+1)*EMA(C,P)*X-(P+1)*(S-1)*EMA(C,S)*X+(S+1)*(P+1)*MJ_1*X)/(2*P-2*S);
Y_3:=((P-1)*(S+1)*EMA(C,P)*X-(P+1)*(S-1)*EMA(C,S)*X+(S+1)*(P+1)*MJ_2*X)/(2*P-2*S);
Y_4:=((P-1)*(S+1)*EMA(C,P)*X-(P+1)*(S-1)*EMA(C,S)*X+(S+1)*(P+1)*Y_1)/(2*P-2*S);
{-----------------【圖解模板】---------------------}
{MACD}
FILLRGN(MJ_1>=MJ_2,MJ_1,MJ_2),Color689AFF;
FILLRGN(MJ_1<MJ_2,MJ_2,MJ_1),ColorFFC000;
FILLRGN(MJ_3>MJ_5,MJ_5,MJ_3),ColorFFB7FF;
FILLRGN(MJ_3<MJ_5,MJ_5,MJ_3),Color003E00;
STICKLINE(MJ_3<ref(MJ_3,1) and MJ_3<0,0,MJ_3,0,0),ColorFFCF78;{藍}
STICKLINE(MJ_3<ref(MJ_3,1) and MJ_3>0,0,MJ_3,0,0),COLORYELLOW;{黃}
STICKLINE(MJ_3>ref(MJ_3,1) and MJ_3<0,0,MJ_3,0,0),ColorAF00AF;{紫}
STICKLINE(MJ_3>ref(MJ_3,1) and MJ_3>0,0,MJ_3,0,0),COLORRED;{紅}
DIFF: MJ_1,PRECISION2,COLORWHITE;
DEA: MJ_2,PRECISION2,COLORYELLOW;
加速:2.8*(MJ_2-MJ_1),LINETHICK,PRECISION2,COLORGREEN;
PARTLINE(RANGE(BARPOS,SYSPARAM(3)-34,SYSPARAM(3)+1),加速),LINEDOT,COLORGREEN;
{www. .com 網_飛狐股票指標公式}
多頭: MJ_3,LINETHICK2,PRECISION2,COLORRED;

推薦文章

收音鸡赚钱 qq麻将怎么下载 开奖结果360 app炒股软件 秒速赛车开奖记录app 炒股平台哪个好 炒股怎样融资·杨方配资 闲来广东麻将安卓下 … pk10官方 湖南幸运赛车直播 丫丫陕西麻将最新版本