

a0=highest(high,9) - lowest(low,9);
a1=highest(high,9) - close;
a2=close - lowest(low,9);
a3=a1 / a0 * 100 - 70;
a4=(close - lowest(low,60)) / (highest(high,60) - lowest(low,60)) * 100;
a5=(2 * close + high + low) / 4;
a6=sma(a2 / a0 * 100,3,1);
a7=lowest(low,34);
a8=sma(a6,3,1) - sma(a3,9,1);
a9=ifelse(a8 > 100,a8 - 100,0);
aa=highest(high,34);
ab=a9 * 2;
ac=ema((a5 - a7) / (aa - a7) * 100,13);
ad=ema(0.667 * refBefore(ac,1) + 0.333 * ac,2);
ae=sma(a4,20,1);
af=sma(ab,2,1) - ab;
b0=ema(0.667 * refBefore(ac,1) + 0.333 * ac,2) - ac;
b1=(highest(high,9) - close) / (highest(high,9) - lowest(low,9)) * 100 - 70;
b2=sma(b1,9,1) + 100;
b3=(close - lowest(low,9)) / (highest(high,9) - lowest(low,9)) * 100;
b4=sma(b3,3,1);
b5=sma(b4,3,1) + 100;
b6=b5 - b2;
b7=ifelse(b6 > 60,b6 - 60,0);
drawStickBetweenIf(refBefore(b7,1) < b7,b7,refBefore(b7,1),color="green",fill=true,linewidth=5);
drawStickBetweenIf(refBefore(b7,1) > b7,b7,refBefore(b7,1),color="#ffff00",fill=true,linewidth=5);
主力=ema((close - ma(close,7)) / ma(close,7) * 480,2);
draw(主力,color="green");
散戶=ema((close - ma(close,11)) / ma(close,11) * 480,7);
draw(散戶,color="white");
drawText(isCrossUp(主力,散戶) && 主力 < -10,-20,"升",color="yellow");
drawText(isCrossUp(主力,散戶) && 主力 < -10 && 散戶 > refBefore(散戶,1) || isCrossUp(主力,散戶) && 散戶 < -35,-15,1,color="white");
加速探底="";
drawIf((ma(close,5) - close) / close > 0.04 && (ma(close,10) - ma(close,5)) / ma(close,5) > 0.04,40,0.85,color="yellow");
機會來臨1=refBefore(ifelse(refBefore(close,1) / close > 0.04 && (ma(close,10) - ma(close,5)) / ma(close,5) > 0.04,40,0),1);
draw(機會來臨1,color="#9999ff");
a11=3 * sma((close - lowest(low,55)) / (highest(high,55) - lowest(low,55)) * 100,5,1) - 2 * sma((close - lowest(low,55)) / (highest(high,55) - lowest(low,55)) * 100,5,1);
黑馬線=ema(a11,5);
a21=(黑馬線 - refBefore(黑馬線,1)) / refBefore(黑馬線,1) * 100;
a31=ema(close,5);
a41=((close - lowest(low,21)) / (highest(high,21) - lowest(low,21))) * 100;
趨勢線=(ma(3 * sma(a41,6,1) - 2 * sma(sma(a41,5,1),5,1),2));
a51=(highest(high,60) - close) / (highest(high,60) - lowest(low,60)) * 100;
drawText(forwardSet(refBefore(黑馬線,1) > 90 && a21 < 0,7),黑馬線,"跑",color="#00ff00");
drawText(isCrossUp(a11,黑馬線) && 黑馬線 < a51,黑馬線,"黑馬",color="yellow");
drawText(isCrossUp(黑馬線,a51) && 趨勢線 < 80,黑馬線,"追漲",color="#688ec1");
drawText(isCrossUp(趨勢線,0) && 黑馬線 < 40,5,"大黑馬",color="#ffff00");
底部=(a21 < -10 && a21 > refBefore(a21,1)) * 25;
drawText(底部 && a31 > refBefore(a31,1),25,1,color="white");
機會來臨2=refBefore(ifelse((ma(close,5) - close) / close > 0.04 && (ma(close,10) - ma(close,5)) / ma(close,5) > 0.04,65,0),1);
draw(機會來臨2,color="#f00ff0");
