大盘指数副图指标编写
要求:有均线,且深股显示深圳指数,沪股显示上证指数。
正确答案:
飞狐:
oo:=INDEXO;
cc:=INDEXC;
hh:=INDEXH;
ll:=INDEXL;
k:=cc>oo or cc=oo and ref(cc,1)>cc;
stickline(k,hh,ll,0,1),colorred;
stickline(k,cc,oo,8,1),colorred;
stickline(not(k),hh,ll,0,0),COLORCYAN;
stickline(not(k),cc,oo,8,0),COLORCYAN;
ma(INDEXC,5),PRECISION2,COLORWHITE;
ma(INDEXC,10),PRECISION2,COLORYELLOW;
ma(INDEXC,20),PRECISION2,COLORMAGENTA;
ma(INDEXC,30),PRECISION2,COLORGREEN;
ma(INDEXC,50),PRECISION2,COLORRED;
ma(INDEXC,120),PRECISION2,COLORCCCC66;
ma(INDEXC,250),PRECISION2,COLORBLUE;
正确答案:
STICKLINE(INDEXC>=INDEXO,INDEXC,INDEXO,7,1),COLORRED;
STICKLINE(INDEXC>=INDEXO,INDEXH,INDEXC,0.5,0),COLORRED;
STICKLINE(INDEXC>=INDEXO,INDEXO,INDEXL,0.5,0),COLORRED;
STICKLINE(INDEXC<INDEXO,INDEXO,INDEXC,7,0),COLORCYAN;
STICKLINE(INDEXC<INDEXO,INDEXH,INDEXL,0.5,0),COLORCYAN;
MA(INDEXC,5);
MA(INDEXC,10);
MA(INDEXC,20);
MA(INDEXC,60);
正确答案:
开:=INDEXO;
收:=INDEXC;
高:=INDEXH;
低:=INDEXL;
STICKLINE(收>开 OR (收>REF(收,1) AND 收=开),高,低,0,0),COLOR5050FF;
STICKLINE(收>开 OR (收>REF(收,1) AND 收=开),收,开,7,1),COLOR5050FF;
STICKLINE(收<开 OR (收<=REF(收,1) AND 收=开),高,低,0,0),COLORCYAN;
STICKLINE(收<开 OR (收<=REF(收,1) AND 收=开),收,开,7,0),COLORCYAN;
MA(INDEXC,5),PRECISION2,COLORWHITE;
MA(INDEXC,20),PRECISION2,COLORMAGENTA;
MA(INDEXC,30),PRECISION2,COLORGREEN;
MA(INDEXC,50),PRECISION2,COLORRED;
MA(INDEXC,120),PRECISION2,COLORCCCC66;
MA(INDEXC,250),PRECISION2,COLORBLUE;
正确答案:
分析家的
oo:=INDEXO;
cc:=INDEXC;
hh:=INDEXH;
ll:=INDEXL;
k:=cc>oo or cc=oo and ref(cc,1)>cc;
stickline(k,hh,ll,0,1),colorred;
stickline(k,cc,oo,8,1),colorred;
stickline(not(k),hh,ll,0,0),COLORCYAN;
stickline(not(k),cc,oo,8,0),COLORCYAN;
ma(INDEXC,5),PRECIS2,COLORWHITE;
ma(INDEXC,10),PRECIS2,COLORYELLOW;
ma(INDEXC,20),PRECIS2,COLORMAGENTA;
ma(INDEXC,30),PRECIS2,COLORGREEN;
ma(INDEXC,50),PRECIS2,COLORRED;
ma(INDEXC,120),PRECIS2,COLORCCCC66;
ma(INDEXC,250),PRECIS2,COLORBLUE;
|