XS跟庄主图,飞狐+通达信源码
本主图操作要点,关注XS线,XH线,人线,和线,以及天人合一。参数N为可调整,调整N取值是有点学问的。文本中含有飞狐和通达信源码,各取所需。指标里用到薛斯源码原理,在此对原作者表示感谢
飞狐源码
n:=144;
均价:=(2*C+(C+H+L+O)/4+O)/4;
R:=(2*L+3*均价)/5;R1:=(2*H+3*均价)/5;
天:REF(HHV(R1,N),1),COLORGREEN;
地:REF(LLV(R,N),1),COLORAAAA00;
人:REF(HHV(R1,n*0.66),1),COLORYELLOW,COLOR7F00FF;
和:(人+地)*0.5,COLORFFCCAA,LINETHICK2;
PARTLINE((R+R1)/2>和,和),COLORRED,LINETHICK2;
CC:=ABS(均价-MA((R+r1)/2,20))/MA((R+r1)/2,20);
xS:DMA(均价,CC),COLORYELLOW,LINETHICK1;
xh:(1+7/100)*xS,COLORMAGENTA,LINEDOT;
xL:(1-7/100)*xS,COLORCYAN,LINEDOT;
下方为通达信源码
n:=144;
均价:=(2*C+(C+H+L+O)/4+O)/4;
R:=(2*L+3*均价)/5;R1:=(2*H+3*均价)/5;
天:REF(HHV(R1,N),1),COLORGREEN;
地:REF(LLV(R,N),1),COLORAAAA00;
人:REF(HHV(R1,n*0.66),1),COLORYELLOW,COLOR7F00FF;
和:(人+地)*0.5,COLORFFCCAA,LINETHICK2;
if((R+R1)/2>和,和,drawnull),COLORRED,LINETHICK2;
CC:=ABS(均价-MA((R+r1)/2,20))/MA((R+r1)/2,20);
xS:DMA(均价,CC),COLORYELLOW,LINETHICK1;
xh:(1+7/100)*xS,COLORMAGENTA;
xL:(1-7/100)*xS,COLORCYAN;