飞狐J均叉减收指标公式

[复制链接]
查看81 | 回复0 | 2021-8-21 12:39:56 | 显示全部楼层 |阅读模式

input:n1(5,1,30,1),n2(10,1,30,1),n3(20,1,60,1),n4(30,1,60,1);
ma1:=ma(c,n1); ma2:=ma(c,n2); ma3:=ma(c,n3); ma4:=ma(c,n4);
明叉12:=(ma2-ma1+ref(c,n1-1)/n1-ref(c,n2-1)/n2) *n1*n2/(n2-n1);
差12:明叉12-c,color0000ff,linethick0,PRECISION2;
明叉13:=(ma3-ma1+ref(c,n1-1)/n1-ref(c,n3-1)/n3)*n1*n3/(n3-n1);
差13:明叉13-c,color00ffff,linethick0,PRECISION2;
明叉23:=(ma3-ma2+ref(c,n2-1)/n2-ref(c,n3-1)/n3)*n2*n3/(n3-n2);
差23:明叉23-c,colorffff00,linethick0,PRECISION2;
明叉24:=(ma4-ma2+ref(c,n2-1)/n2-ref(c,n4-1)/n4)*n2*n4/(n4-n2);
差24:明叉24-c,colorff00ff,linethick0,PRECISION2;
stickline(cross(ma1,ma2) ,差12,0,1,0),color0000ff,linethick2;
stickline(cross(ma2,ma1) ,差12,0,1,0),color0000aa,linethick2;
stickline(cross(ma1,ma3) ,差13,0,1,0),color00ffff,linethick2;
stickline(cross(ma3,ma1) ,差13,0,1,0),color00aaaa,linethick2;
stickline(cross(ma2,ma3) ,差23,0,1,0),colorffff00,linethick2;
stickline(cross(ma3,ma2) ,差23,0,1,0),coloraaaa00,linethick2;
stickline(cross(ma2,ma4) ,差24,0,1,0),colorff00ff,linethick2;
stickline(cross(ma4,ma2) ,差24,0,1,0),coloraa00aa,linethick2;
PARTLINE(ma1>ma2,差12),Color0000A0,linethick2;
PARTLINE(ma1<=ma2,差12),Color0000FF,linethick2;
PARTLINE(ma1>ma3,差13),Color00A0A0,linethick2;
PARTLINE(ma1<=ma3,差13),Color00FFFF,linethick2;
PARTLINE(ma2>ma3,差23),ColorB4B400,linethick2;
PARTLINE(ma2<=ma3,差23),ColorFFFF00,linethick2;
PARTLINE(ma2>ma4,差24),ColorB400B4,linethick2;
PARTLINE(ma2<=ma4,差24),ColorFF00FF,linethick2;
0,coloraaaaaa;

202108211158.jpg

202108211158.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则