N1:=14;
LC:=REF(CLOSE,1);
品种强弱:(SMA(MAX(CLOSE-LC,0),N1,1))/(SMA(Abs(CLOSE-LC),N1,1))*100,LINETHICK2;
LC1:=REF(INDEXC,1);
指数强弱:(SMA(MAX(INDEXC-LC1,0),N1,1))/(SMA(ABS(INDEXC-LC1),N1,1))*100,LINETHICK2;
强弱度:品种强弱-指数强弱,LINETHICK0;
DRAWBAND(品种强弱,RGB(99,0,0),指数强弱,RGB(0,99,0));
MA(品种强弱,8);
20;
50,LINETHICK2;
80;
DRAWTEXT_FIX(CONST(强弱度>0),0.1,0.2,0,'该品种现阶段强于指数'),COLORYELLOW;
DRAWTEXT_FIX(CONST(强弱度=0),0.1,0.2,0,'该品种现阶段与指数同步'),COLORYELLOW;
DRAWTEXT_FIX(CONST(强弱度<0),0.1,0.2,0,'该品种现阶段弱于指数'),COLORYELLOW;
DRAWTEXT_FIX(CONST(品种强弱>=50),0.1,0.3,0,'该品种现阶段属于强势'),COLORYELLOW;
DRAWTEXT_FIX(CONST(品种强弱<50),0.1,0.3,0,'该品种现阶段属于弱势'),COLORYELLOW;
DRAWTEXT_FIX(CONST(品种强弱>=MA(品种强弱,8)),0.1,0.4,0,'指标处于多头趋势'),COLORYELLOW;
DRAWTEXT_FIX(CONST(品种强弱<MA(品种强弱,8)),0.1,0.4,0,'指标处于空头趋势\N股价可能进入调整'),COLORYELLOW;
DRAWTEXT_FIX(CONST(CLOSE>REF(HIGH,1) AND 品种强弱>=MA(品种强弱,5)),0.1,0.6,0,'多头攻击k线;做多以当日最低价为止损位'),COLORYELLOW;
DRAWTEXT_FIX(CONST(CLOSE<REF(LOW,1) AND HIGH<REF(HIGH,1) AND 品种强弱<MA(品种强弱,8)),0.1,0.7,0,'空头攻击K线;多头注意止损'),COLORYELLOW;
DRAWTEXT_FIX(CONST(HIGH>REF(HIGH,1) AND LOW<REF(LOW,1) AND CLOSE>OPEN AND 品种强弱>=MA(品种强弱,5)),0.1,0.8,0,'变盘K线;多头设置当日最低点为止损位。'),COLORYELLOW;
DRAWTEXT_FIX(CONST(HIGH>REF(HIGH,1) AND LOW<REF(LOW,1) AND CLOSE<=OPEN),0.1,0.9,0,'变盘K线;多头小心,设置当日最低点为止损位。'),COLORYELLOW;