{量化交易}
STICKLINE(CLOSE,30,40,4,1),COLOR404000;
STICKLINE(CLOSE,20,30,4,1),COLOR404000;
STICKLINE(CLOSE,0,20,4,1),COLOR404000;
STICKLINE(CLOSE,0,10,4,1),COLOR404000;
gspt1:=EMA(CLOSE,5);
gspt2:=EMA(VOL,5);
gspt3:=MA(CLOSE,5);
gspt4:=MA(CLOSE,10);
gspt5:=MA(CLOSE,20);
gspt6:=EMA(SLOPE(CLOSE,21)*20+CLOSE,55);
gspt7:=CLOSE>gspt3;
gspt8:=CLOSE>gspt4;
gspt9:=CLOSE>gspt5;
gspt10:=gspt3>gspt4;
gspt11:=gspt3>gspt5;
gspt12:=REF(gspt5,1);
gspt13:=gspt5>gspt12;
gspt14:=IF(gspt7,10,0-10)+IF(gspt8,10,0-10)+IF(gspt9,10,0-10)+IF(gspt10,10,0-10)+IF(gspt11,10,0-10)+IF(gspt13,10,0-10);
gspt15:=ATAN((gspt1/REF(gspt1,1)-1)*100)*180/3.1416;
gspt16:=ATAN((gspt2/REF(gspt2,1)-1)*100)*180/3.1416;
gspt17:=CLOSE>gspt6 AND OPEN>gspt6 AND CLOSE>OPEN AND gspt15>50 AND gspt16>70;
gspt18:=FILTER(gspt17,13);
gspt19:=gspt18<=0;
gspt20:=BARSLAST(NOT(gspt19));
gspt21:=MA(LOW+(HIGH-LOW)/2,26)*1.15;
gspt22:=MA(LOW+(HIGH-LOW)/2,26)*0.95;
gspt23:=(gspt21+gspt22)/2;
gspt24:=(MA(CLOSE,5)+MA(OPEN,5))/2*1.06;
gspt25:=(MA(CLOSE,5)+MA(OPEN,5))/2*0.98;
gspt26:=(gspt24+gspt25)/2;
gspt27:=gspt24>gspt22;
gspt28:=gspt24>gspt23;
gspt29:=gspt24>gspt21;
gspt30:=gspt26>gspt22;
gspt31:=gspt26>gspt23;
gspt32:=gspt26>gspt21;
gspt33:=gspt25>gspt22;
gspt34:=gspt25>gspt23;
gspt35:=gspt25>gspt21;
gspt36:=IF(gspt27,10,0-10)+IF(gspt28,10,0-10)+IF(gspt29,10,0-10)+IF(gspt30,10,0-10)+IF(gspt31,10,0-10)+IF(gspt32,10,0-10)+IF(gspt33,10,0-10)+IF(gspt34,10,0-10)+IF(gspt35,10,0-10);
gspt37:=EMA(EMA(EMA(CLOSE,13),13),13);
gspt38:=ATAN((gspt37/REF(gspt37,1)-1)*100)*180/3.1416;
gspt39:=gspt38>0;{,公式源码 }
gspt40:=BARSLAST(NOT(gspt39));
gspt41:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;
gspt42:=CEILING(SMA(gspt41,13,8));
gspt43:=gspt42< 10 AND gspt14=(-60) AND gspt15< (-60);
gspt44:=BARSLAST(NOT(gspt43< 1));
STICKLINE(gspt43>0,1,9,3,1),COLORRED;
STICKLINE(gspt18=1,11,19,3,1),COLORMAGENTA;
STICKLINE(gspt36=10 AND REF(gspt36< 10,1),21,29,3,1),COLORGREEN;
STICKLINE(gspt40=1,31,39,3,1),COLORYELLOW;
DRAWNUMBER(gspt39>=0,36,gspt40),COLORWHITE;
DRAWNUMBER(gspt36>=0,26,gspt36),COLORWHITE;
DRAWNUMBER(gspt36< 0,26,0),COLORWHITE;
DRAWNUMBER(gspt18<=1,16,gspt20),COLORWHITE;
DRAWNUMBER(gspt43>=0,6,gspt44),COLORWHITE;