缠论副图源码 副图 通达信 贴图
DIFF2:=MA(C,5),LINETHICK2;
DEA2:=MA(C,10),COLORWHITE,LINETHICK2;
MACD:=(DIFF2-DEA2),COLORSTICK;
均线差:(DIFF2-DEA2),COLORSTICK,COLORBLUE;
操盘:STICKLINE(2*(DIFF2-DEA2)>=0 AND 2*(DIFF2-DEA2)>=REF(2*(DIFF2-
DEA2),1),0,2*(DIFF2-DEA2),2,0),COLORRED;
反弹:STICKLINE(2*(DIFF2-DEA2)<0 AND 2*(DIFF2-DEA2)>=REF(2*(DIFF2-
DEA2),1),0,2*(DIFF2-DEA2),2,0),COLORYELLOW,LINETHICK1;
减仓:STICKLINE(2*(DIFF2-DEA2)>=0 AND 2*(DIFF2-DEA2)< REF(2*(DIFF2-
DEA2),1),0,2*(DIFF2-DEA2),2,0),COLORFF9900,LINETHICK1;
寻底:STICKLINE(2*(DIFF2-DEA2)<0 AND 2*(DIFF2-DEA2)< REF(2*(DIFF2-
DEA2),1),0,2*(DIFF2-DEA2),2,0),COLORGREEN,LINETHICK1;
BV:=SUM(MACD,0);
BA:=IF(MAX(BV,REF(BV,2))<REF(BV,1) OR MIN(BV,REF(BV,2))>REF(BV,1),1,0);
BC:=BARSLAST(BA)+1;
SMACD:=(BV-REF(BV,BC))/50,COLORBLUE;
JC:= DEA2-DIFF2;
VAR3:=IF(MACD>0,HHV(ABS(MACD),BC),LLV(MACD,BC));
VAR4:=(MACD);
VAR5:=SMACD*100;
绿柱面积:IF (MACD<0,SUM(MACD*0.1,BARSLAST
(JC<0)),0),LINETHICK0,COLORBLUE;
红柱面积:IF (MACD>0,SUM(MACD*0.1,BARSLAST
(JC>0)),0),LINETHICK0,,COLORFF00FF;
D:=MACD;
A1:=IF(D>0,1,-1);
A2:=REF(A1,1);
A3:=A1*A2;
A4:=BARSLAST(A3<0);
A5:=A4+1;
趋势平均力度:(SUM(D,0)-REF(SUM(D,0),A5))/A5,LINETHICK0;
时间:(A4+1)/100,LINETHICK0;
来函数检测结果如下:
该公式没有未来函数
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
DIFF2赋值:C的5日简单移动平均, 线宽为2
DEA2赋值:C的10日简单移动平均,画白色, 线宽为2
MACD赋值:(DIFF2-DEA2),COLORSTICK
输出
均线差:(DIFF2-DEA2),COLORSTICK, 画蓝色
输出
操盘:STICKLINE(2*(DIFF2-DEA2)>=0 AND 2*(DIFF2-DEA2)>=REF(2*(DIFF2-
DEA2),1),0,2*(DIFF2-DEA2),2,0),画红色
输出
反弹:STICKLINE(2*(DIFF2-DEA2)<0 AND 2*(DIFF2-DEA2)>=REF(2*(DIFF2-
DEA2),1),0,2*(DIFF2-DEA2),2,0),画黄色,LINETHICK1
输出
减仓:STICKLINE(2*(DIFF2-DEA2)>=0 AND 2*(DIFF2-DEA2)< REF(2*(DIFF2-
DEA2),1),0,2*(DIFF2-DEA2),2,0),COLORFF9900,LINETHICK1
输出
寻底:STICKLINE(2*(DIFF2-DEA2)<0 AND 2*(DIFF2-DEA2)< REF(2*(DIFF2-
DEA2),1),0,2*(DIFF2-DEA2),2,0),画绿色,LINETHICK1
BV赋值:0的MACD日累和
BA赋值:IF(BV和2日前的BV较大值<1日前的BV OR BV和2日前的BV的较小值>1日前的BV,1,0)
BC赋值:上次BA距今天数+1
SMACD赋值:(BV-BC日前的BV)/50, 画蓝色
JC赋值: DEA2-DIFF2
VAR3赋值:IF(MACD>0,HHV(MACD的绝对值,BC),BC日内MACD最低值)
VAR4赋值:(MACD)
VAR5赋值:SMACD*100
输出
绿柱面积:IF (MACD<0,SUM(MACD*0.1,BARSLAST
(JC<0)),0),LINETHICK0, 画蓝色
输出
红柱面积:IF (MACD>0,SUM(MACD*0.1,BARSLAST
(JC>0)),0),LINETHICK0,,COLORFF00FF
D赋值:MACD
如果D>0返回1否则返回-1
A2赋值:1日前的A1
A3赋值:A1*A2
A4赋值:上次A3<0距今天数
A5赋值:A4+1
输出
趋势平均力度:(0的D日累和-REF(0的D日累和,A5))/A5,LINETHICK0
输出
时间:(A4+1)/100,LINETHICK0