{GSTO股市天气}
MA5:=MA(C,5);
MA10:=MA(C,10);
TTT1:=IF((C>=SAR.SAR) AND ((C > MA5) OR (C>MA10)),70,0);
TTT2:=IF((C>SAR.SAR) AND ((C < MA5) AND (C<MA10)),50,0);
TTT3:=IF((C<SAR.SAR),30,0);
仓位策略:TTT1+TTT2+TTT3,NODRAW,COLORFF00FF;
MMM1:=IF((C>MA5) AND (MA5>MA10),70,0);
MMM2:=IF((C<MA5) AND (MA5<MA10),30,0);
TEMP2:=MMM1+MMM2;
MMM3:=IF(TEMP2=0,50,0);
安全分析:MMM1+MMM2+MMM3,NODRAW,COLORBLUE;
股市天气:仓位策略*0.5+安全分析*0.5,COLORFF0080,LINETHICK2;
转晴:30,COLORFF00FF,POINTDOT,LINETHICK2;
太阳:65,COLORLICYAN,POINTDOT,LINETHICK2;
多云:60,COLOR808040,POINTDOT,LINETHICK2;
阴天:50,COLORFF8080,POINTDOT,LINETHICK4
{IF(CROSS(仓位策略,32) AND REF(仓位策略=30 ,1),50,30),COLORRED;};
IF(股市天气=30,30,DRAWNULL),COLOR808000,LINETHICK3;
IF(股市天气=70,70,DRAWNULL),COLORRED,LINETHICK3;
{买卖区间}
底线红多绿空:0,NODRAW,COLORRED;
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
STICKLINE(买线>卖线,29,28,1,0),COLORRED;
STICKLINE(买线<=卖线,29,28,1,0),COLORGREEN;
天气线上做多:0,NODRAW,COLORFF0080;
DRAWTEXT(ISLASTBAR, 阴天,'--阴天'),COLORC08000;
DRAWTEXT(ISLASTBAR, 多云,'--多云'),COLORFF80FF;
DRAWTEXT(ISLASTBAR, 太阳,'--太阳'),COLORRED;
STICKLINE(股市天气<50,股市天气,50,0,0),COLOR808000;
STICKLINE(股市天气>50,60,50,0,0),COLORRED;
STICKLINE(股市天气>60,60,股市天气,1,0),COLORRED;
STICKLINE(股市天气>50,31,32,1,0),COLORFF00FF;
DRAWICON(股市天气=50 AND REF(股市天气<50,1),50,11);
DRAWICON(股市天气=50 AND REF(股市天气>50,1),50,12);