源码
N:=9;P1:=3;P2:=3;P3:=3;
AA:=(SUM(IF(CLOSE>REF(CLOSE,1) AND VOL>REF(VOL,1),VOL,0),N))/FINANCE(7);
BB:=(SUM(IF(CLOSE[
DDY:(AA-BB)/FINANCE(7),LINETHICK0;]
STICKLINE(DDY>=0,0,DDY,8,0),color22FF;
STICKLINE(DDY>0,0,DDY,1,0),color22FF;
STICKLINE(DDY>0,0,DDY,5,0),color66FF;
STICKLINE(DDY>0,0,DDY,3,0),color99FF;
STICKLINE(DDY>0,0,DDY,1.5,0),colorDDFF;
STICKLINE(DDY>0,0,DDY,0,0),colorDDFF;
STICKLINE(DDY<0,0,DDY,8,0),colorFF2200;
STICKLINE(DDY<=0,0,DDY,1,0),colorFF2200;
STICKLINE(DDY<0,0,DDY,5,0),colorFF6600;
STICKLINE(DDY<0,0,DDY,3,0),colorFF9900;
STICKLINE(DDY<0,0,DDY,1.5,0),colorFFDD00;
STICKLINE(DDY<0,0,DDY,0,0),colorFFDD00;
买:EMA(DDY,P1)*P1,LINETHICK1,colorFFFF;
加仓:MA(DDY,P2),LINETHICK1,colorFF00FF;
卖:MA(DDY,P3),LINETHICK1,colorFF00;
VARIABLE:WDAY[7]='星期六';
WDAY[1]:='星期日';
WDAY[2]:='星期一';
WDAY[3]:='星期二';
WDAY[4]:='星期三';
WDAY[5]:='星期四';
WDAY[6]:='星期五';
FY:=YEAR;
FM:=MONTH;
FD:=DAY;
WD:=WEEKDAY;
P:=SYSPARAM(1);
STR1:=''+NUMTOSTR(FY[P],0)+'年'+NUMTOSTR(FM[P],0)+'月'+NUMTOSTR(FD[P],0)+'日 '+WDAY[WD[P]+1];
DRAWTEXTEX(CLOSE>0,1,650,0,STR1),colorFFAF;
DRAWTEXTEX(CLOSE>0,1,280,0,STKLABEL+' '+STKNAME+''),colorFFAF;
DRAWTEXTEX(CLOSE>0,1,10,0,'涨跌动因='+NUMTOSTR(AA-BB,2)),LINETHICK3,colorFFFF8;