问:希望在通达信主图中只显示当天的融胜轨道线?
源码是融胜轨道的晴天老师的版本:
DD:=DMA(CLOSE,ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20));
融上:(1+7/100)*DD,COLORYELLOW;
融下:(1-7/100)*DD,COLORYELLOW;
融中:(融上+融下)/2,COLORYELLOW;
晴上:(1+N/100)*DD,COLORGREEN,DOTLINE;
晴下:(1-N/100)*DD,COLORGREEN,DOTLINE;
EPPP:=(HIGH+LOW+OPEN+2*CLOSE)/5;
DRAWNUMBER(ISLASTBAR,融上,融上),COLOR00FFFF;
DRAWNUMBER(ISLASTBAR,融下,融下),COLORFFFF00;
DRAWNUMBER(ISLASTBAR,融中,融中),COLOR00FF00;
DRAWNUMBER(ISLASTBAR,晴上,晴上),COLOR0000FF;
DRAWNUMBER(ISLASTBAR,晴下,晴下),COLORWHITE;
希望修改成只显示当天的轨道线和价格,以前的轨道线不显示。
答案:
s:=3;
DD:=DMA(CLOSE,ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20));
融上:(1+7/100)*DD,COLORYELLOW,NODRAW;
融下:(1-7/100)*DD,COLORYELLOW,NODRAW;
融中:(融上+融下)/2,COLORYELLOW,NODRAW;
晴上:(1+N/100)*DD,COLORGREEN,NODRAW;
晴下:(1-N/100)*DD,COLORGREEN,NODRAW;
EPPP:=(HIGH+LOW+OPEN+2*CLOSE)/5;
DRAWNUMBER(ISLASTBAR,融上,融上),COLOR00FFFF;
DRAWNUMBER(ISLASTBAR,融下,融下),COLORFFFF00;
DRAWNUMBER(ISLASTBAR,融中,融中),COLOR00FF00;
DRAWNUMBER(ISLASTBAR,晴上,晴上),COLOR0000FF;
DRAWNUMBER(ISLASTBAR,晴下,晴下),COLORWHITE;
IF(CURRBARSCOUNT<S,融上,DRAWNULL),COLOR00FFFF;
IF(CURRBARSCOUNT<S,融下,DRAWNULL),COLORFFFF00;
IF(CURRBARSCOUNT<S,融中,DRAWNULL),COLOR00FF00;
IF(CURRBARSCOUNT<S,晴上,DRAWNULL),COLOR0000FF;
IF(CURRBARSCOUNT<S,晴下,DRAWNULL),COLORWHITE;