主线:=EMA(EMA(C,1),5);
本:=EMA(HHV(主线,5),1),COLOR00FFFF,LINETHICK2;
急:=EMA(HHV(本,21),1),COLOR0089FF,LINETHICK1;
稳:=EMA(HHV(急,21),2),COLORDB89FF,COLOR00FF00,LINETHICK2;
投:=EMA(HHV(稳,21),3),COLOR8916FF,LINETHICK1;
散:=EMA(HHV(投,21),4),COLORFFCC62,LINETHICK1;
集:=EMA(HHV(散,21),5),COLORFFFFFF,LINETHICK2;
马:=EMA(HHV(集,21),6),COLORFF5B5E,LINETHICK2;
OX:0;
XG:=主线/马*100-100;
春:=XG<0 AND XG>=REF(XG,1);
夏:=XG>0 AND XG>REF(XG,1);
秋:=XG>0 AND XG<REF(XG,1);
冬:=XG<0 AND XG<REF(XG,1);
幅:=(XG-REF(XG,1))/100;
DRAWRECTREL(200,500,500,999,RGB(255,0,255));
DRAWRECTREL(200,1,500,500,90);
DRAWRECTREL(500,1,800,500,RGB(218,165,32));
DRAWRECTREL(500,500,800,999,RGB(50,205,50));
DRAWTEXT_FIX(1,0.25,0.75,1,'春');
DRAWTEXT_FIX(1,0.25,0.25,1,'夏');
DRAWTEXT_FIX(1,0.75,0.25,1,'秋');
DRAWTEXT_FIX(1,0.75,0.75,1,'冬');
DRAWTEXT_FIX(春=1 AND CURRBARSCOUNT=1,0.48,0.61*(1-5*幅),1,'今天-');
DRAWTEXT_FIX(春=1 AND CURRBARSCOUNT=2,0.44,0.61*(1-5*幅),1,'前1-');
DRAWTEXT_FIX(春=1 AND CURRBARSCOUNT=3,0.40,0.61*(1-5*幅),1,'前2-');
DRAWTEXT_FIX(春=1 AND CURRBARSCOUNT=4,0.36,0.61*(1-5*幅),1,'前3-');
DRAWTEXT_FIX(春=1 AND CURRBARSCOUNT=5,0.32,0.61*(1-5*幅),1,'前4-');
DRAWTEXT_FIX(夏=1 AND CURRBARSCOUNT=1,0.49,0.41*(1-5*幅),1,'今天-');
DRAWTEXT_FIX(夏=1 AND CURRBARSCOUNT=2,0.46,0.41*(1-5*幅),1,'前1-');
DRAWTEXT_FIX(夏=1 AND CURRBARSCOUNT=3,0.42,0.41*(1-5*幅),1,'前2-_');
DRAWTEXT_FIX(夏=1 AND CURRBARSCOUNT=4,0.38,0.41*(1-5*幅),1,'前3-');
DRAWTEXT_FIX(夏=1 AND CURRBARSCOUNT=5,0.34,0.41*(1-5*幅),1,'前4-');
DRAWTEXT_FIX(秋=1 AND CURRBARSCOUNT=1,0.67,0.31*(1-5*幅),1,'今天-');
DRAWTEXT_FIX(秋=1 AND CURRBARSCOUNT=2,0.64,0.31*(1-5*幅),1,'前1-');
DRAWTEXT_FIX(秋=1 AND CURRBARSCOUNT=3,0.61,0.31*(1-5*幅),1,'前2-');
DRAWTEXT_FIX(秋=1 AND CURRBARSCOUNT=4,0.57,0.31*(1-5*幅),1,'前3-');
DRAWTEXT_FIX(秋=1 AND CURRBARSCOUNT=5,0.53,0.31*(1-5*幅),1,'前4-');
DRAWTEXT_FIX(冬=1 AND CURRBARSCOUNT=1,0.55,0.51*(1-5*幅),1,'-今天');
DRAWTEXT_FIX(冬=1 AND CURRBARSCOUNT=2,0.59,0.51*(1-5*幅),1,'-前1');
DRAWTEXT_FIX(冬=1 AND CURRBARSCOUNT=3,0.63,0.51*(1-5*幅),1,'-前2');
DRAWTEXT_FIX(冬=1 AND CURRBARSCOUNT=4,0.67,0.51*(1-5*幅),1,'-前3');
DRAWTEXT_FIX(冬=1 AND CURRBARSCOUNT=5,0.71,0.51*(1-5*幅),1,'-前4');
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.5,0.1,1,C);
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.45,0.1,1,'现价:');
春天1:=IF(春=1,XG,MA(XG,10)),COLORMAGENTA,LINETHICK2;
夏天1:=IF(夏=1,XG,MA(XG,10)),COLORRED,LINETHICK2;
秋天1:=IF(秋=1,XG,MA(XG,10)),COLORYELLOW,DOTLINE;
冬天1:=IF(冬=1,XG,MA(XG,10)),COLORCYAN,DOTLINE;
STICKLINE(春天1>MA(XG,10),春天1,MA(XG,10),2,0),COLORFF00FF;
STICKLINE(夏天1>MA(XG,10),夏天1,MA(XG,10),2,0),COLORRED;
STICKLINE(秋天1<MA(XG,10),秋天1,MA(XG,10),2,0),COLORBROWN;
STICKLINE(冬天1<MA(XG,10),冬天1,MA(XG,10),2,0),COLORCYAN;
春天:IF(春=1,C,MA(XG,10)),COLORMAGENTA,LINETHICK1;
夏天:IF(夏=1,C,MA(XG,10)),COLORRED,LINETHICK1;
秋天:IF(秋=1,-1,MA(XG,10)),COLORYELLOW,DOTLINE;
冬天:IF(冬=1,-20,MA(XG,10)),COLORCYAN,DOTLINE; |