通达信公式全周期净量
T00:=200;
AF1:=300;
FX:=IF(C>REF(C,1),1,IF(C<REF(C,1),-1,0));
TT:=IF(PERIOD=0,BARSLAST(HOUR=9 AND MINUTE=31)+1,T00);
最高价:=CONST(HHV(H,TT));
最低价:=CONST(LLV(L,TT));
单位:=CONST((最高价-最低价)/40);
DRAWGBK(1,RGB(0,50,100),RGB(0,50,100),1,0,0);
K线数目:CURRBARSCOUNT,NODRAW;
采样数:T00,NODRAW;
{价位分档-----------------------------------------------------------------------------------}
M00:=最低价;{}
M01:=最低价+01*单位;M02:=最低价+02*单位;M03:=最低价+03*单位;M04:=最低价+04*单位;M05:=最低价+05*单位;
M06:=最低价+06*单位;M07:=最低价+07*单位;M08:=最低价+08*单位;M09:=最低价+09*单位;M10:=最低价+10*单位;
M11:=最低价+11*单位;M12:=最低价+12*单位;M13:=最低价+13*单位;M14:=最低价+14*单位;M15:=最低价+15*单位;
M16:=最低价+16*单位;M17:=最低价+17*单位;M18:=最低价+18*单位;M19:=最低价+19*单位;M20:=最低价+20*单位;
M21:=最低价+21*单位;M22:=最低价+22*单位;M23:=最低价+23*单位;M24:=最低价+24*单位;M25:=最低价+25*单位;
M26:=最低价+26*单位;M27:=最低价+27*单位;M28:=最低价+28*单位;M29:=最低价+29*单位;M30:=最低价+30*单位;
M31:=最低价+31*单位;M32:=最低价+32*单位;M33:=最低价+33*单位;M34:=最低价+34*单位;M35:=最低价+35*单位;
M36:=最低价+36*单位;M37:=最低价+37*单位;M38:=最低价+38*单位;M39:=最低价+39*单位;M40:=最低价+40*单位;
{量位分档--------------------------------------------------------------------------------------}
{买方}
B01:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M00),CONST(M01) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B02:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M01),CONST(M02) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B03:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M02),CONST(M03) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B04:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M03),CONST(M04) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B05:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M04),CONST(M05) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B06:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M05),CONST(M06) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B07:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M06),CONST(M07) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B08:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M07),CONST(M08) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B09:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M08),CONST(M09) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B10:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M09),CONST(M10) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B11:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M10),CONST(M11) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B12:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M11),CONST(M12) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B13:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M12),CONST(M13) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B14:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M13),CONST(M14) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B15:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M14),CONST(M15) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B16:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M15),CONST(M16) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B17:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M16),CONST(M17) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B18:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M17),CONST(M18) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B19:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M18),CONST(M19) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B20:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M19),CONST(M20) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B21:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M20),CONST(M21) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B22:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M21),CONST(M22) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B23:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M22),CONST(M23) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B24:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M23),CONST(M24) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B25:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M24),CONST(M25) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B26:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M25),CONST(M26) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B27:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M26),CONST(M27) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B28:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M27),CONST(M28) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B29:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M28),CONST(M29) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B30:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M29),CONST(M30) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B31:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M30),CONST(M31) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B32:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M31),CONST(M32) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B33:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M32),CONST(M33) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
T00赋值:200
AF1赋值:300
FX赋值:IF(C>1日前的C,1,IF(C<1日前的C,-1,0))
TT赋值:IF(PERIOD=0,上次HOUR=9 AND MINUTE=31距今天数+1,T00)
最高价赋值:CONST(TT日内H最高值)
最低价赋值:CONST(TT日内L最低值)
单位赋值:CONST((最高价-最低价)/40)
填充背景(1,RGB(0,50,100),RGB(0,50,100),1,0,0)
输出
K线数目: 到最后交易的周期,NODRAW
输出
采样数:T00,NODRAW
{价位分档-----------------------------------------------------------------------------------}
M00赋值:最低价
{}
M01赋值:最低价+01*单位
M02赋值:最低价+02*单位
M03赋值:最低价+03*单位
M04赋值:最低价+04*单位
M05赋值:最低价+05*单位
M06赋值:最低价+06*单位
M07赋值:最低价+07*单位
M08赋值:最低价+08*单位
M09赋值:最低价+09*单位
M10赋值:最低价+10*单位
M11赋值:最低价+11*单位
M12赋值:最低价+12*单位
M13赋值:最低价+13*单位
M14赋值:最低价+14*单位
M15赋值:最低价+15*单位
M16赋值:最低价+16*单位
M17赋值:最低价+17*单位
M18赋值:最低价+18*单位
M19赋值:最低价+19*单位
M20赋值:最低价+20*单位
M21赋值:最低价+21*单位
M22赋值:最低价+22*单位
M23赋值:最低价+23*单位
M24赋值:最低价+24*单位
M25赋值:最低价+25*单位
M26赋值:最低价+26*单位
M27赋值:最低价+27*单位
M28赋值:最低价+28*单位
M29赋值:最低价+29*单位
M30赋值:最低价+30*单位
M31赋值:最低价+31*单位
M32赋值:最低价+32*单位
M33赋值:最低价+33*单位
M34赋值:最低价+34*单位
M35赋值:最低价+35*单位
M36赋值:最低价+36*单位
M37赋值:最低价+37*单位
M38赋值:最低价+38*单位
M39赋值:最低价+39*单位
M40赋值:最低价+40*单位
{量位分档--------------------------------------------------------------------------------------}
{买方}
B01赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M00),CONST(M01) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B02赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M01),CONST(M02) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B03赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M02),CONST(M03) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B04赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M03),CONST(M04) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B05赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M04),CONST(M05) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B06赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M05),CONST(M06) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B07赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M06),CONST(M07) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B08赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M07),CONST(M08) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B09赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M08),CONST(M09) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B10赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M09),CONST(M10) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B11赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M10),CONST(M11) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B12赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M11),CONST(M12) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B13赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M12),CONST(M13) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B14赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M13),CONST(M14) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B15赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M14),CONST(M15) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B16赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M15),CONST(M16) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B17赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M16),CONST(M17) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B18赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M17),CONST(M18) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B19赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M18),CONST(M19) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B20赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M19),CONST(M20) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B21赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M20),CONST(M21) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B22赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M21),CONST(M22) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B23赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M22),CONST(M23) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B24赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M23),CONST(M24) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B25赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M24),CONST(M25) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B26赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M25),CONST(M26) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B27赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M26),CONST(M27) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B28赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M27),CONST(M28) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B29赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M28),CONST(M29) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B30赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M29),CONST(M30) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B31赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M30),CONST(M31) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B32赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M31),CONST(M32) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))
B33赋值:CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M32),CONST(M33) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT))