LC:=REF(CLOSE,1);
AA:=ABS(HIGH-LC);
BB:=ABS(LOW-LC);
CC:=ABS(HIGH-REF(LOW,1));
DD:=ABS(LC-REF(OPEN,1));
X:=(CLOSE-LC+(CLOSE-OPEN)/2+LC-REF(OPEN,1));
R1:IF(AA>BB AND AA>CC,AA+BB/2+DD/4,IF(BB>CC AND BB>AA,BB+AA/2+DD/4,CC+DD/4)),linethick2;
r:16*X/R1*MAX(AA,BB),linethick2,COLORFF00FF;
ASI1:=SUM(r,0);
STICKLINE(r>0,0,r*2.5,7,0),color0000ee;
STICKLINE(r<0,0,r*2.5,6,0),colorgreen;
DDX1:=SMA(MA(r,1),2,1)*5,colorwhite,linethick2;
DDX8:=MA(DDX1,3),COLOR00FFFF;
DDX2:=SMA(DDX8,7,2),color0000FF,linethick2;
DDX3:=EMA((DDX1+DDX2)/2,2),color00EE00,linethick2;
通:=MA(C,17);
子:=MA(C,26);
突通:=CROSS(C,通);
突子:=CROSS(C,子);
转多:=R>0 AND REF(R,1)<0,LINETHICK2 ,colorgreen;
转空:=R<0 AND REF(R,1)>0,LINETHICK2 ,colorgreen;
最佳买卖金叉进死叉出:=(转多) AND (突通 OR 突子),colorgreen;
STICKLINE(最佳买卖金叉进死叉出,0,R*2.4,10,0),color004444;
STICKLINE(最佳买卖金叉进死叉出,0,R*2.4,8,0),color005555;
STICKLINE(最佳买卖金叉进死叉出,0,R*2.4,7,0),color006666;
STICKLINE(最佳买卖金叉进死叉出,0,R*2.4,6,0),color007777;
STICKLINE(最佳买卖金叉进死叉出,0,R*2.4,5,0),color008888;
STICKLINE(最佳买卖金叉进死叉出,0,R*2.4,4,0),color009999;
STICKLINE(最佳买卖金叉进死叉出,0,R*2.4,3,0),color00aaaa;
STICKLINE(最佳买卖金叉进死叉出,0,R*2.4,2,0),color00bbbb;
DRAWICON(最佳买卖金叉进死叉出,-ABS(DDX2)*1.6,'11');
DRAWTEXT(最佳买卖金叉进死叉出,-ABS(DDX2)*3.6,'最佳'),COLORFF00FF;