彩色线数据表示"明日交叉价"与"今日收盘价"的差; 含义例举: "差12" 表示 "明日ma1与ma2交叉价" 与 "今日收盘价"的差; "昨日的收盘价"加"昨日的指标值"即为"今日的交叉价"; 彩色线向0靠近说明两均线交叉条件要求逐渐降低;与0轴很接近,预示即将交叉; 短竖线含义:暗色线上亮竖线 - 两均线金叉; 亮色线下暗竖线 - 两均线死叉; 亮色线表示两均线处于空头状态,指标线数据为"明日金叉价"与"今日收盘价"的差; 大多数时间亮色线处于0轴上方,数据表示"明日两均线金叉比今日收盘要上涨的最小数值"; 亮色线处于0轴下方,数据表示"明日两均线金叉比今日收盘能下跌的最大数值",预示明日两均线金叉可能性极大; 暗色线表示两均线处于多头状态,指标线数据为"明日金叉价"与"今日收盘价"的差; 大多数时间暗色线处于0轴下方,数据表示"明日两均线死叉比今日收盘要下跌的最小数值"; 暗色线处于0轴上方,数据表示"明日两均线死叉比今日收盘能上涨的最大数值",预示明日两均线死叉可能性极大;
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;