源码
N:=10;STEP:=2;MAXP:=20;
BB:=REF(DATE,BARSCOUNT(CLOSE)-1);
SS:=IF(BB>1000000,BB+1000000,BB);
DRAWTEXT(SYSPARAM(2)=BARPOS,CLOSE,'上市'),ALIGN5,colorFF;
DRAWNUMBER(SYSPARAM(2)=BARPOS,LOW,SS,0),ALIGN5,SHIFT5,colorFFFF;
DRAWTEXT(SYSPARAM(2)=BARPOS,CLOSE,'证券代码:'+STKLABEL),ALIGN4,colorFF00;
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(CLOSE,A1+1)>CLOSE AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
线1:(EMA(CLOSE,5)+EMA(CLOSE,10)+EMA(CLOSE,25))/3,colorFF00;
线2:(EMA(CLOSE,5)+EMA(CLOSE,10)+EMA(CLOSE,20)+EMA(CLOSE,30)+EMA(CLOSE,60)+EMA(CLOSE,120))/6,colorFF00;
线3:(EMA(CLOSE,20)+EMA(CLOSE,60)+EMA(CLOSE,120))/3,LINETHICK2,colorFF00;
线4:=(EMA(CLOSE,13)+EMA(CLOSE,34)+EMA(CLOSE,55))/3;
STICKLINE(线1>线4,线1,线4,0.1,1),colorFF0080;
STICKLINE(线1<线4,线1,线4,0.1,1),colorFF00;
PARTLINE(线1>线2,线3),LINETHICK2,colorFF;
PARTLINE(线1>线2,线1),colorFF;
PARTLINE(线2>线3,线2),colorFF;