DRAWGBK(1,COLORRGB(0,0,20),COLORRGB(0,60,50),1);
DRAWTEXTEX(CLOSE,1,0,22,STKLABEL+' '+STKNAME+''),colorddfF;
BB:=BARPOS=SYSPARAM(1);
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,1,460,22,STR1),colorDDFF;
50,LINEDOT;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
macd1:=2*(DIFF-DEA);
日转红:=MacD1>=0 AND REF(MACD1,1)<0;
CS1:=100;
CS2:=HHV(Abs(MACD1),CS1);
CS3:=ABS(100/CS2);
MACD:(MACD1*CS3+100)/2,LINETHICK3,color00FF00;
CS:=MACD;
日红:=CS>=REF(CS,1);
日转红:=日红 AND REF(日红,1)=0;
PARTLINE(日红,CS),LINETHICK3,colorred;
AA:=0;
V1:=LLV(LOW,10);
V2:=HHV(HIGH,25);
价位线:=EMA((CLOSE-V1)/(V2-V1)*4,4);
DRAWTEXT(crOSS(价位线,0.3),AA,'买'),color0000FF;
DRAWTEXT(CROSS(3.7,价位线),AA,'卖'),colorFF00;
VERTLINE(CROSS(价位线,0.3)),color0000FF,LINEDASHDOT;
VERTLINE(CROSS(3.7,价位线)),colorFF00,LINEDASHDOT;