IF NN=2 THEN BEGIN
A11:="1A0001$CLOSE";
A21:="399001$CLOSE";
A1:=IF(CLOSE=A11,A21,A11);
A2:=REF(A1,1);
A3:=(A1-A2)/MIN(A1,A2)*100;
大盘涨幅:=SUM(A3,10);
B2:=REF(CLOSE,1);
B3:=(CLOSE-B2)/MIN(CLOSE,B2)*100;
个股涨幅:=SUM(B3,10);
XD:=个股涨幅-大盘涨幅;
快线:EMA(XD,10),LINETHICK1;
慢线:EMA(快线,5),LINETHICK1;
差值:(快线-慢线)*2,COLORSTICK;
PARTLINE(快线>REF(快线,1),快线),LINETHICK1,colorFF00FF;
周期类型:=DATATYPE;
EXPLAIN(周期类型=6,'短期强弱解盘'),colorFF00;
EXPLAIN(周期类型=7,'中期强弱解盘'),colorFF00;
EXPLAIN(周期类型=8,'长期强弱解盘'),colorFF00;
EXPLAIN(周期类型<6,'分钟线解盘'),colorFF00;
EXPLAIN(REF(快线,1)>快线 AND 差值>0,'关注可能转弱'),colorFFFF;
EXPLAIN(REF(快线,1)<快线 AND 慢线<0,'关注可能转强'),colorF0E1FF;
EXPLAIN(CROSS(快线,慢线) AND 快线<0,'金叉慎重买入,走势弱于大盘'),colorF0E1FF;
EXPLAIN(快线>慢线 AND 慢线<0,'已开始转强,持股,走势弱于大盘'),colorF0E1FF;
EXPLAIN(CROSS(快线,慢线) AND 慢线>0,'金叉大胆买入,走势强于大盘'),colorF0E1FF;
EXPLAIN(快线>慢线 AND 慢线>0,'强势,持股,走势强于大盘'),colorF0E1FF;
EXPLAIN(CROSS(慢线,快线) AND 慢线>0,'死叉慎重卖出,走势强于大盘'),colorFFFF;
EXPLAIN(快线<慢线 AND 慢线>0,'已开始转弱,空仓,走势强于大盘'),colorFFFF;
EXPLAIN(CROSS(慢线,快线) AND 快线<0,'死叉卖出,走势弱于大盘'),colorFFFF;
EXPLAIN(快线<慢线 AND 慢线<0,'弱势,空仓,走势弱于大盘'),colorFFFF;
早晨之星:=REF(CLOSE,2)/REF(OPEN,2)<0.95 AND REF(OPEN,1)<REF(CLOSE,2) AND (ABS(REF(OPEN,1)-REF(CLOSE,1)))/REF(CLOSE,1)<0.03 AND CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2);
黄昏之星:=REF(CLOSE,2)/REF(OPEN,2)>1.03 AND REF(OPEN,1)>REF(CLOSE,2) AND (ABS(REF(OPEN,1)-REF(CLOSE,1)))/REF(CLOSE,1)<0.02 AND CLOSE/OPEN<0.97 AND CLOSE<REF(CLOSE,2);
长十字:=CLOSE=OPEN AND HIGH/LOW>1.03;
垂死十字:=CLOSE=OPEN AND CLOSE=LOW AND CLOSE<>HIGH;
早晨十字星:=REF(CLOSE,2)/REF(OPEN,2)<0.95 AND REF(OPEN,1)<REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) AND CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2);
黄昏十字星:=REF(CLOSE,2)/REF(OPEN,2)>1.05 AND REF(OPEN,1)>REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) AND CLOSE/OPEN<0.95 AND CLOSE<REF(CLOSE,2);
射击之星:=MIN(OPEN,CLOSE)=LOW AND HIGH-LOW>3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE>MA(CLOSE,5);
倒转锤头:=MIN(OPEN,CLOSE)=LOW AND HIGH-LOW>3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE<MA(CLOSE,5);
锤头:=HIGH=MAX(OPEN,CLOSE) AND HIGH-LOW>3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE<MA(CLOSE,5);
吊颈:=HIGH=MAX(OPEN,CLOSE) AND HIGH-LOW>3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE>MA(CLOSE,5);
穿头破脚:=REF(CLOSE,1)/REF(OPEN,1)>1.03 AND CLOSE/OPEN<0.96 AND CLOSE<REF(OPEN,1) AND OPEN>REF(CLOSE,1) OR REF(CLOSE,1)/REF(OPEN,1)<0.97 AND CLOSE/OPEN>1.04 AND CLOSE>REF(OPEN,1) AND OPEN<REF(CLOSE,1);
乌云盖顶:=REF(CLOSE,1)/REF(OPEN,1)>1.03 AND CLOSE/OPEN<0.97 AND OPEN>REF(CLOSE,1) AND CLOSE<REF(CLOSE,1);
曙光初现:=REF(CLOSE,1)/REF(OPEN,1)<0.97 AND CLOSE/OPEN>1.03 AND OPEN<REF(CLOSE,1) AND CLOSE>REF(CLOSE,1);
身怀六甲:=(ABS(REF(CLOSE,1)-REF(OPEN,1)))/REF(CLOSE,1)>0.04 AND (ABS(CLOSE-OPEN))/CLOSE<0.005 AND MAX(CLOSE,OPEN)<MAX(REF(CLOSE,1),REF(OPEN,1)) AND MIN(CLOSE,OPEN)>MIN(REF(CLOSE,1),REF(OPEN,1));
十字胎:=(ABS(REF(CLOSE,1)-REF(OPEN,1)))/REF(CLOSE,1)>0.04 AND CLOSE=OPEN AND CLOSE<MAX(REF(CLOSE,1),REF(OPEN,1)) AND CLOSE>MIN(REF(CLOSE,1),REF(OPEN,1));
平顶:=(ABS(HIGH-REF(HIGH,1)))/HIGH<0.001;
平底:=(ABS(LOW-REF(LOW,1)))/LOW<0.001 AND (ABS(REF(LOW,1)-REF(LOW,2)))/REF(LOW,1)<=0.001;
大阳烛:=CLOSE/OPEN>1.05 AND HIGH/LOW<CLOSE/OPEN+0.018;
三个白武士:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)>REF(OPEN,1) AND CLOSE>OPEN AND REF(CLOSE,1)>REF(CLOSE,2) AND CLOSE>REF(CLOSE,1);
双飞乌鸦:=REF(CLOSE,1)<REF(OPEN,1) AND CLOSE<OPEN AND CLOSE/OPEN<0.98;
孕育线:=REF(CLOSE,2)>REF(OPEN,2) AND (REF(CLOSE,2)-REF(OPEN,2))/REF(OPEN,2)>=2/100 AND REF(OPEN,1)>=REF(CLOSE,1) AND (REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<=2/100 AND REF(OPEN,1)<=REF(CLOSE,2) AND REF(CLOSE,1)>=REF(OPEN,2) AND CLOSE>=OPEN AND (CLOSE-OPEN)/OPEN>=2/100 AND CLOSE>=REF(OPEN,1) AND OPEN<=REF(CLOSE,1) AND (MAX(CLOSE,REF(CLOSE,2))-MIN(CLOSE,REF(CLOSE,2)))/MIN(CLOSE,REF(CLOSE,2))<=1/100;
多方炮:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND CLOSE>OPEN;
出水芙蓉:=(OPEN<EMA(CLOSE,20) OR OPEN<EMA(CLOSE,40) OR OPEN<EMA(CLOSE,60)) AND CLOSE>MAX(EMA(CLOSE,20),MAX(EMA(CLOSE,40),EMA(CLOSE,60))) AND VOL/MA(VOL,30)>1.2 AND CLOSE/REF(CLOSE,1)>1.049;
上升三部曲:=REF(CLOSE,4)/REF(OPEN,4)>1.03 AND REF(CLOSE,3)<REF(OPEN,3) AND REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND REF(LOW,4)<REF(LOW,3) AND REF(LOW,4)<REF(LOW,2) AND REF(LOW,4)<REF(LOW,1) AND REF(HIGH,4)>REF(HIGH,3) AND REF(HIGH,4)>REF(HIGH,2) AND REF(HIGH,4)>REF(HIGH,1) AND CLOSE/OPEN>1.03 AND CLOSE>REF(CLOSE,4);
下跌三部曲:=REF(CLOSE,4)/REF(OPEN,4)<0.97 AND REF(CLOSE,3)>REF(OPEN,3) AND REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)>REF(OPEN,1) AND REF(LOW,4)<REF(LOW,3) AND REF(LOW,4)<REF(LOW,2) AND REF(LOW,4)<REF(LOW,1) AND REF(HIGH,4)>REF(HIGH,3) AND REF(HIGH,4)>REF(HIGH,2) AND REF(HIGH,4)>REF(HIGH,1) AND CLOSE/OPEN<0.97 AND CLOSE<REF(CLOSE,4);
跳空缺口:=HIGH<REF(LOW,1) OR LOW>REF(HIGH,1);
三只乌鸦:=REF(CLOSE,2)<REF(OPEN,2) AND REF(CLOSE,1)<REF(OPEN,1) AND CLOSE<OPEN AND REF(CLOSE,1)<REF(CLOSE,2) AND CLOSE<REF(CLOSE,1);
光脚阴线:=LOW=CLOSE AND HIGH<>LOW;
光头阳线:=HIGH=CLOSE AND HIGH<>LOW;
分离:=OPEN=REF(OPEN,1) AND (CLOSE-OPEN)*(REF(CLOSE,1)-REF(OPEN,1))<0;
长下影:=(MIN(CLOSE,OPEN)-LOW)/(HIGH-LOW)>0.667;
长上影:=(HIGH-MAX(CLOSE,OPEN))/(HIGH-LOW)>0.667;
十字星:=CLOSE=OPEN AND HIGH<>LOW;
大阴烛:=OPEN/CLOSE>1.05 AND HIGH/LOW<OPEN/CLOSE+0.018;
好友反攻:=REF(CLOSE,1)<REF(OPEN,1) AND CLOSE>OPEN AND (ABS(CLOSE-REF(CLOSE,1)))/CLOSE<0.002 OR REF(CLOSE,1)>REF(OPEN,1) AND CLOSE<OPEN AND (ABS(CLOSE-REF(CLOSE,1)))/CLOSE<0.002;
倾盆大雨:=REF(CLOSE,1)/REF(OPEN,1)>=1.03 AND OPEN<REF(CLOSE,1) AND OPEN>REF(OPEN,1) AND CLOSE<REF(OPEN,1);
EXPLAIN(倾盆大雨,'K线形态分析:倾盆大雨,见顶信号;'),colorFFFF00;
EXPLAIN(大阴烛,'K线形态分析:大阴烛,后市向淡,发生逆转;'),colorFFFF00;
EXPLAIN(好友反攻,'K线形态分析:好友反攻,底部反转;'),colorFF;
EXPLAIN(跳空缺口,'K线形态分析:跳空缺口,注意向上还是向下跳空;'),colorFFFFFF;
EXPLAIN(光脚阴线,'K线形态分析:光脚阴线,下跌信号;'),colorFFFF00;
EXPLAIN(光头阳线,'K线形态分析:光头阳线,后市看涨;'),colorFF;
EXPLAIN(三只乌鸦,'K线形态分析:三只乌鸦,可能见顶回落;'),colorFFFF00;
EXPLAIN(分离,'K线形态分析:分离,注意看涨分离和看跌分离;'),colorFFFFFF;
EXPLAIN(长下影,'K线形态分析:长下影,持续下跌后出现,有可能止跌回升;在升势末期出现,须多加留意;'),colorFF;
EXPLAIN(长上影,'K线形态分析:长上影,表明行情上档压力沉重,升势受阻;'),colorFFFF00;
EXPLAIN(下跌三部曲,'K线形态分析:下跌三部曲,下跌信号;'),colorFF;
EXPLAIN(上升三部曲,'K线形态分析:上升三部曲,上涨信号;'),colorFFFF00;
EXPLAIN(早晨之星,'K线形态分析:早晨之星,见底回升;'),colorFF;
EXPLAIN(黄昏之星,'K线形态分析:黄昏之星,见顶回落;'),colorFFFF00;
EXPLAIN(十字星,'K线形态分析:十字星,有转向意味,注意股价位置在顶部还是底部;'),colorFFFFFF;
EXPLAIN(长十字,'K线形态分析:长十字,注意在顶部还是底部;'),colorFFFFFF;
EXPLAIN(垂死十字,'K线形态分析:垂死十字,下跌信号;'),colorFFFF00;
EXPLAIN(早晨十字星,'K线形 |