神奇九转主图通达信公式 主图 源码附图
A1:=C>=REF(C,4);
A:=C<REF(C,4);
AA:=C<REF(C,4) AND REF(A1,1);
T:=BARSLAST(AA)NODRAW;
M:=(T=0 AND REFX(T=1 AND NOT(A),1)) OR (REFX(T=2 AND NOT(A),2)) OR (REFX(T=3 AND NOT(A),3)) OR (REFX(T=4 AND NOT(A),4)) OR (REFX(T=5 AND NOT(A),5))
OR (REFX(T=6 AND NOT(A),6)) OR (REFX(T=7 AND NOT(A),7)) OR (REFX(T=8 AND NOT(A),8));
M1:=T=1 AND REFX(T=2 AND NOT(A),1) OR (REFX(T=3 AND NOT(A),2)) OR (REFX(T=4 AND NOT(A),3)) OR (REFX(T=5 AND NOT(A),4)) OR (REFX(T=6 AND NOT(A),5))
OR (REFX(T=7 AND NOT(A),6)) OR (REFX(T=8 AND NOT(A),7));
M2:=T=2 AND REFX(T=3 AND NOT(A),1) OR (REFX(T=4 AND NOT(A),2)) OR (REFX(T=5 AND NOT(A),3)) OR (REFX(T=6 AND NOT(A),4)) OR (REFX(T=7 AND NOT(A),5)) OR (REFX(T=8 AND NOT(A),6));
M3:=T=3 AND REFX(T=4 AND NOT(A),1)OR (REFX(T=5 AND NOT(A),2)) OR (REFX(T=6 AND NOT(A),3)) OR (REFX(T=7 AND NOT(A),4)) OR (REFX(T=8 AND NOT(A),5));
M4:=T=4 AND REFX(T=5 AND NOT(A),1) OR (REFX(T=6 AND NOT(A),2)) OR (REFX(T=7 AND NOT(A),3)) OR (REFX(T=8 AND NOT(A),4));
M5:=T=5 AND REFX(T=6 AND NOT(A),1) OR (REFX(T=7 AND NOT(A),2)) OR (REFX(T=8 AND NOT(A),3));
M6:=T=6 AND REFX(T=7 AND NOT(A),1) OR (REFX(T=8 AND NOT(A),2));
M7:=T=7 AND REFX(T=8 AND NOT(A),1);
N:=T=1 AND REF(T=0 AND AA,1) AND A;
N1:=T=2 AND REF(N,1) AND A;
N2:=T=3 AND REF(N1,1) AND A;
N3:=T=4 AND REF(N2,1) AND A;
N4:=T=5 AND REF(N3,1) AND A;
N5:=T=6 AND REF(N4,1) AND A;
N6:=T=7 AND REF(N5,1) AND A;
N7:=T=8 AND REF(N6,1) AND A;
DRAWTEXT(T=0,H*1.02,'1')COLORGREEN;
DRAWTEXT(N,H*1.02,'2')COLORGREEN;
DRAWTEXT(N1,H*1.02,'3')COLORGREEN;
DRAWTEXT(N2,H*1.02,'4')COLORGREEN;
DRAWTEXT(N3,H*1.02,'5')COLORGREEN;
DRAWTEXT(N4,H*1.02,'6')COLORGREEN;
DRAWTEXT(N5,H*1.02,'7')COLORGREEN;
DRAWTEXT(N6,H*1.02,'8')COLORGREEN;
DRAWTEXT(N7,H*1.02,'9')COLORGREEN;
DRAWICON(N7,H*1.04,1)COLORGREEN;
DRAWTEXT(M,H*1.02,'1')COLORBLACK;
DRAWTEXT(M1,H*1.02,'2')COLORBLACK;
DRAWTEXT(M2,H*1.02,'3')COLORBLACK;
DRAWTEXT(M3,H*1.02,'4')COLORBLACK;
DRAWTEXT(M4,H*1.02,'5')COLORBLACK;
DRAWTEXT(M5,H*1.02,'6')COLORBLACK;
DRAWTEXT(M6,H*1.02,'7')COLORBLACK;
DRAWTEXT(M7,H*1.02,'8')COLORBLACK;
B1:=C<=REF(C,4);
B:=C>REF(C,4);
BB:=C>REF(C,4) AND REF(B1,1);
T1:=BARSLAST(BB)NODRAW;
M111:=(T1=0 AND REFX(T1=1 AND NOT(B),1)) OR (REFX(T1=2 AND NOT(B),2)) OR (REFX(T1=3 AND NOT(B),3)) OR (REFX(T1=4 AND NOT(B),4)) OR (REFX(T1=5 AND NOT(B),5))
OR (REFX(T1=6 AND NOT(B),6)) OR (REFX(T1=7 AND NOT(B),7)) OR (REFX(T1=8 AND NOT(B),8));
M11:=T1=1 AND REFX(T1=2 AND NOT(B),1) OR (REFX(T1=3 AND NOT(B),2)) OR (REFX(T1=4 AND NOT(B),3)) OR (REFX(T1=5 AND NOT(B),4)) OR (REFX(T1=6 AND NOT(B),5))
OR (REFX(T1=7 AND NOT(B),6)) OR (REFX(T1=8 AND NOT(B),7));
M22:=T1=2 AND REFX(T1=3 AND NOT(B),1) OR (REFX(T1=4 AND NOT(B),2)) OR (REFX(T1=5 AND NOT(B),3)) OR (REFX(T1=6 AND NOT(B),4)) OR (REFX(T1=7 AND NOT(B),5)) OR (REFX(T1=8 AND NOT(B),6));
M33:=T1=3 AND REFX(T1=4 AND NOT(B),1)OR (REFX(T1=5 AND NOT(B),2)) OR (REFX(T1=6 AND NOT(B),3)) OR (REFX(T1=7 AND NOT(B),4)) OR (REFX(T1=8 AND NOT(B),5));
M44:=T1=4 AND REFX(T1=5 AND NOT(B),1) OR (REFX(T1=6 AND NOT(B),2)) OR (REFX(T1=7 AND NOT(B),7)) OR (REFX(T1=8 AND NOT(B),4));
M55:=T1=5 AND REFX(T1=6 AND NOT(B),1) OR (REFX(T1=7 AND NOT(B),2)) OR (REFX(T1=8 AND NOT(B),3));
M66:=T1=6 AND REFX(T1=7 AND NOT(B),1) OR (REFX(T1=8 AND NOT(B),2));
M77:=T1=7 AND REFX(T1=8 AND NOT(B),1);
N111:=T1=1 AND REF(T1=0 AND BB,1) AND B;
N11:=T1=2 AND REF(N111,1) AND B;
N22:=T1=3 AND REF(N11,1) AND B;
N33:=T1=4 AND REF(N22,1) AND B;
N44:=T1=5 AND REF(N33,1) AND B;
N55:=T1=6 AND REF(N44,1) AND B;
N66:=T1=7 AND REF(N55,1) AND B;
N77:=T1=8 AND REF(N66,1) AND B;
DRAWTEXT(T1=0,H*1.02,'1')COLOR9900CC;
DRAWTEXT(N111,H*1.02,'2')COLOR9900CC;
DRAWTEXT(N11,H*1.02,'3')COLOR9900CC;
DRAWTEXT(N22,H*1.02,'4')COLOR9900CC;
DRAWTEXT(N33,H*1.02,'5')COLOR9900CC;
DRAWTEXT(N44,H*1.02,'6')COLOR9900CC;
DRAWTEXT(N55,H*1.02,'7')COLOR9900CC;
DRAWTEXT(N66,H*1.02,'8')COLOR9900CC;
DRAWTEXT(N77,H*1.02,'9')COLOR9900CC;
DRAWICON(N77,H*1.04,2);{股票指标网}
DRAWTEXT(M111,H*1.02,'1')COLORBLACK;
DRAWTEXT(M11,H*1.02,'2')COLORBLACK;
DRAWTEXT(M22,H*1.02,'3')COLORBLACK;
DRAWTEXT(M33,H*1.02,'4')COLORBLACK;
DRAWTEXT(M44,H*1.02,'5')COLORBLACK;
DRAWTEXT(M55,H*1.02,'6')COLORBLACK;
DRAWTEXT(M66,H*1.02,'7')COLORBLACK;
DRAWTEXT(M77,H*1.02,'8')COLORBLACK;
未来函数检测结果如下:
该公式包含未来函数:REFX
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
A1赋值:C>=4日前的C
A赋值:C<4日前的C
AA赋值:C<4日前的C AND 1日前的A1
T赋值:上次AA距今天数NODRAW
M赋值:(T=0 AND REFX(T=1 AND NOT(A),1)) OR (REFX(T=2 AND NOT(A),2)) OR (REFX(T=3 AND NOT(A),3)) OR (REFX(T=4 AND NOT(A),4)) OR (REFX(T=5 AND NOT(A),5))
OR (REFX(T=6 AND NOT(A),6)) OR (REFX(T=7 AND NOT(A),7)) OR (REFX(T=8 AND NOT(A),8))
M1:=T=1 AND REFX(T=2 AND NOT(A),1) OR (REFX(T=3 AND NOT(A),2)) OR (REFX(T=4 AND NOT(A),3)) OR (REFX(T=5 AND NOT(A),4)) OR (REFX(T=6 AND NOT(A),5))
OR (REFX(T=7 AND NOT(A),6)) OR (REFX(T=8 AND NOT(A),7))
M2:=T=2 AND REFX(T=3 AND NOT(A),1) OR (REFX(T=4 AND NOT(A),2)) OR (REFX(T=5 AND NOT(A),3)) OR (REFX(T=6 AND NOT(A),4)) OR (REFX(T=7 AND NOT(A),5)) OR (REFX(T=8 AND NOT(A),6))
M3:=T=3 AND REFX(T=4 AND NOT(A),1)OR (REFX(T=5 AND NOT(A),2)) OR (REFX(T=6 AND NOT(A),3)) OR (REFX(T=7 AND NOT(A),4)) OR (REFX(T=8 AND NOT(A),5))
M4:=T=4 AND REFX(T=5 AND NOT(A),1) OR (REFX(T=6 AND NOT(A),2)) OR (REFX(T=7 AND NOT(A),3)) OR (REFX(T=8 AND NOT(A),4))
M5:=T=5 AND REFX(T=6 AND NOT(A),1) OR (REFX(T=7 AND NOT(A),2)) OR (REFX(T=8 AND NOT(A),3))
M6:=T=6 AND REFX(T=7 AND NOT(A),1) OR (REFX(T=8 AND NOT(A),2))
M7:=T=7 AND REFX(T=8 AND NOT(A),1)
N赋值:T=1 AND 1日前的T=0 AND AA AND A
N1:=T=2 AND 1日前的N AND A
N2:=T=3 AND 1日前的N1 AND A
N3:=T=4 AND 1日前的N2 AND A
N4:=T=5 AND 1日前的N3 AND A
N5:=T=6 AND 1日前的N4 AND A
N6:=T=7 AND 1日前的N5 AND A
N7:=T=8 AND 1日前的N6 AND A
当满足条件T=0时,在H*1.02和'1'位置书写文字
当满足条件N时,在H*1.02和'2'位置书写文字
当满足条件N1时,在H*1.02和'3'位置书写文字
当满足条件N2时,在H*1.02和'4'位置书写文字
当满足条件N3时,在H*1.02和'5'位置书写文字
当满足条件N4时,在H*1.02和'6'位置书写文字
当满足条件N5时,在H*1.02和'7'位置书写文字
当满足条件N6时,在H*1.02和'8'位置书写文字
当满足条件N7时,在H*1.02和'9'位置书写文字
当满足条件N7时,在H*1.04和1之间画图标
当满足条件M时,在H*1.02和'1'位置书写文字
当满足条件M1时,在H*1.02和'2'位置书写文字
当满足条件M2时,在H*1.02和'3'位置书写文字
当满足条件M3时,在H*1.02和'4'位置书写文字
当满足条件M4时,在H*1.02和'5'位置书写文字
当满足条件M5时,在H*1.02和'6'位置书写文字
当满足条件M6时,在H*1.02和'7'位置书写文字
当满足条件M7时,在H*1.02和'8'位置书写文字
B1赋值:C<=4日前的C
B赋值:C>4日前的C
BB赋值:C>4日前的C AND 1日前的B1
T1:=上次BB距今天数NODRAW
M111:=(T1=0 AND REFX(T1=1 AND NOT(B),1)) OR (REFX(T1=2 AND NOT(B),2)) OR (REFX(T1=3 AND NOT(B),3)) OR (REFX(T1=4 AND NOT(B),4)) OR (REFX(T1=5 AND NOT(B),5))
OR (REFX(T1=6 AND NOT(B),6)) OR (REFX(T1=7 AND NOT(B),7)) OR (REFX(T1=8 AND NOT(B),8))
M11:=T1=1 AND REFX(T1=2 AND NOT(B),1) OR (REFX(T1=3 AND NOT(B),2)) OR (REFX(T1=4 AND NOT(B),3)) OR (REFX(T1=5 AND NOT(B),4)) OR (REFX(T1=6 AND NOT(B),5))
OR (REFX(T1=7 AND NOT(B),6)) OR (REFX(T1=8 AND NOT(B),7))
M22:=T1=2 AND REFX(T1=3 AND NOT(B),1) OR (REFX(T1=4 AND NOT(B),2)) OR (REFX(T1=5 AND NOT(B),3)) OR (REFX(T1=6 AND NOT(B),4)) OR (REFX(T1=7 AND NOT(B),5)) OR (REFX(T1=8 AND NOT(B),6))
M33:=T1=3 AND REFX(T1=4 AND NOT(B),1)OR (REFX(T1=5 AND NOT(B),2)) OR (REFX(T1=6 AND NOT(B),3)) OR (REFX(T1=7 AND NOT(B),4)) OR (REFX(T1=8 AND NOT(B),5))
M44:=T1=4 AND REFX(T1=5 AND NOT(B),1) OR (REFX(T1=6 AND NOT(B),2)) OR (REFX(T1=7 AND NOT(B),7)) OR (REFX(T1=8 AND NOT(B),4))
M55:=T1=5 AND REFX(T1=6 AND NOT(B),1) OR (REFX(T1=7 AND NOT(B),2)) OR (REFX(T1=8 AND NOT(B),3))
M66:=T1=6 AND REFX(T1=7 AND NOT(B),1) OR (REFX(T1=8 AND NOT(B),2))
M77:=T1=7 AND REFX(T1=8 AND NOT(B),1)
N111:=T1=1 AND 1日前的T1=0 AND BB AND B
N11:=T1=2 AND 1日前的N111 AND B
N22:=T1=3 AND 1日前的N11 AND B
N33:=T1=4 AND 1日前的N22 AND B
N44:=T1=5 AND 1日前的N33 AND B
N55:=T1=6 AND 1日前的N44 AND B
N66:=T1=7 AND 1日前的N55 AND B
N77:=T1=8 AND 1日前的N66 AND B
当满足条件T1=0时,在H*1.02和'1'位置书写文字
当满足条件N111时,在H*1.02和'2'位置书写文字
当满足条件N11时,在H*1.02和'3'位置书写文字
当满足条件N22时,在H*1.02和'4'位置书写文字
当满足条件N33时,在H*1.02和'5'位置书写文字
当满足条件N44时,在H*1.02和'6'位置书写文字
当满足条件N55时,在H*1.02和'7'位置书写文字
当满足条件N66时,在H*1.02和'8'位置书写文字
当满足条件N77时,在H*1.02和'9'位置书写文字
当满足条件N77时,在H*1.04和2之间画图标
当满足条件M111时,在H*1.02和'1'位置书写文字
当满足条件M11时,在H*1.02和'2'位置书写文字
当满足条件M22时,在H*1.02和'3'位置书写文字
当满足条件M33时,在H*1.02和'4'位置书写文字
当满足条件M44时,在H*1.02和'5'位置书写文字
当满足条件M55时,在H*1.02和'6'位置书写文字
当满足条件M66时,在H*1.02和'7'位置书写文字
当满足条件M77时,在H*1.02和'8'位置书写文字