通达信【主力资金进场与出场副图】指标源码
VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);VAR3:=EMA(VAR2,10);VAR4:=LLV(LOW,33);VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3) ;主力资金进场:IF(VAR5>REF(VAR5,1),0,VAR5),COLORRED,NODRAW;STICKLINE(VAR5>REF(VAR5,1),VAR5,0,1.5,0 ),COLORRED;洗盘:IF(VAR5<REF(VAR5,1),VAR5,0),COLORGREEN,NODRAW;STICKLINE(VAR5<REF(VAR5,1),0,VAR5,1.5,0),COLORGREEN;VAR12:=SMA(ABS(VAR1-H),13,1)/SMA(MAX(VAR1-H,0),10,1);VAR13:=EMA(VAR12,10);VAR14:=HHV(H,33);VAR15:=EMA(IF(H>=VAR14,VAR13,0),3);主力资金出场:IF(VAR15<REF(VAR15,1),VAR15,0),COLORYELLOW,POINTDOT,LINETHICK0;STICKLINE(VAR15<REF(VAR15,1),0,VAR15,1.5,0 ),COLORYELLOW;冲顶:IF(VAR15>REF(VAR15,1),VAR15,0),COLORFF00FF,POINTDOT,LINETHICK0;STICKLINE(VAR15>REF(VAR15,1),0,VAR15,1.5,0),COLORFF00FF;A1:=REF(CLOSE,2);A2:=SMA(MAX(CLOSE-A1,0),7,1)/SMA(ABS(CLOSE-A1),7,1)*100;资金介入点:IF(A2<19,19,0)COLORWHITE;VARC:=SMA(ABS(L-REF(L,1)),3,1)/SMA(MAX(L-REF(L,1),0),3,1);金山:EMA(IF(L<= LLV(L,30),VARC,0),3),COLORBLUE,LINETHICK2;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR1赋值:REF((最低价+开盘价+收盘价+最高价)/4,1)
VAR2赋值:SMA(最低价-VAR1的绝对值,13,1)/SMA(最低价-VAR1和0较大值,10,1)
VAR3赋值:VAR2的10日指数移动平均
VAR4赋值:33日内最低价最低值
如果最低价<=VAR4返回VAR3否则返回0
输出主力资金进场:IF(VAR5>1日前的VAR5,0,VAR5),画红色,NODRAW
STICKLINE(VAR5>1日前的VAR5,VAR5,0,1.5,0 ),画红色
输出洗盘:IF(VAR5<1日前的VAR5,VAR5,0),画绿色,NODRAW
STICKLINE(VAR5<1日前的VAR5,0,VAR5,1.5,0),画绿色
VAR12:=SMA(VAR1-H的绝对值,13,1)/SMA(VAR1-H和0较大值,10,1)
VAR13:=VAR12的10日指数移动平均
VAR14:=33日内H最高值
如果H>=VAR14返回VAR13否则返回0
输出主力资金出场:IF(VAR15<1日前的VAR15,VAR15,0),画黄色,POINTDOT,LINETHICK0
STICKLINE(VAR15<1日前的VAR15,0,VAR15,1.5,0 ),画黄色
输出冲顶:IF(VAR15>1日前的VAR15,VAR15,0),COLORFF00FF,POINTDOT,LINETHICK0
STICKLINE(VAR15>1日前的VAR15,0,VAR15,1.5,0),COLORFF00FF
A1赋值:2日前的收盘价
A2赋值:SMA(收盘价-A1和0较大值,7,1)/SMA(收盘价-A1的绝对值,7,1)*100
如果A2<19返回19否则返回0
VARC赋值:SMA(L-1日前的L的绝对值,3,1)/SMA(L-1日前的L和0较大值,3,1)
输出金山:EMA(IF(L<= 30日内L最低值,VARC,0),3), 画蓝色, 线宽为2