一、通达信南川三代分时主图指标公式
TT2:=1000;
王子0:=(BARSLAST(((HOUR = 9) AND (MINUTE = 31))) + 1);
王子1:=((AMOUNT / VOL) / 100);
王子2:=(SUM((CLOSE * VOL),0) / SUM(VOL,0));
王子3:=(((SETCODE = 0) OR (SETCODE = 1)) AND (CLOSE < 500));
HHH:IF(((SETCODE < 2) AND (CONST(BARSSINCE(CLOSE)) < 241)),CONST(IF((TIME < TT2),HHV(CLOSE,0),SUM((IF((TIME = TT2),1,0) * HHV(CLOSE,0)),0))),DRAWNULL),DOTLINE,COLORFF0000;
LLL:IF(((SETCODE < 2) AND (CONST(BARSSINCE(CLOSE)) < 241)),CONST(IF((TIME < TT2),HHV(CLOSE,0),SUM((IF((TIME = TT2),1,0) * LLV(CLOSE,0)),0))),DRAWNULL),DOTLINE,COLORFF0000;
王子6:=IF(王子3,王子1,王子2);
价位:CLOSE,LINETHICK4,COLORWHITE;
王子8:='NCFSYY00.MACS#DAY';
王子9:=(王子8 * 1.3);
王子10:=((CLOSE > REF(CLOSE,1)) AND ((CLOSE / 王子6) > (1 + (王子8 / 100))));
王子11:=((CLOSE < REF(CLOSE,1)) AND ((CLOSE / 王子6) < (1 - (王子8 / 100))));
王子12:=((REF(SUM(王子10,0),1) = 0) AND (SUM(王子10,0) = 1));
王子13:=((REF(SUM(王子11,0),1) = 0) AND (SUM(王子11,0) = 1));
王子14:=(SUM(王子12,0) * CROSS(COUNT((CLOSE < REF(CLOSE,1)),BARSLAST(王子12)),0.5));
王子15:=(SUM(王子13,0) * CROSS(COUNT((CLOSE > REF(CLOSE,1)),BARSLAST(王子13)),0.5));
CS1:CONST(SUM(IF(王子14,REF(CLOSE,1),DRAWNULL),0)),LINETHICK2,COLORGREEN;
CB1:CONST(SUM(IF(王子15,REF(CLOSE,1),DRAWNULL),0)),LINETHICK2,COLORMAGENTA;
王子18:=CROSS(SUM((王子10 AND (CLOSE > (CS1 * (1 + (王子9 / 100))))),0),0.5);
王子19:=CROSS(SUM((王子11 AND (CLOSE < (CB1 * (1 - (王子9 / 100))))),0),0.5);
王子20:=(SUM(王子18,0) * CROSS(COUNT((CLOSE < REF(CLOSE,1)),BARSLAST(王子18)),0.5));
王子21:=(SUM(王子19,0) * CROSS(COUNT((CLOSE > REF(CLOSE,1)),BARSLAST(王子19)),0.5));
CS2:CONST(SUM(IF(王子20,REF(CLOSE,1),DRAWNULL),0)),COLORGREEN;
CB2:CONST(SUM(IF(王子21,REF(CLOSE,1),DRAWNULL),0)),COLORMAGENTA;
DRAWICON((王子12 OR 王子18),(CLOSE * 1.001),39);
DRAWICON((王子13 OR 王子19),(CLOSE * 0.999),38);
DRAWICON((王子15 OR 王子21),(REF(CLOSE,1) * 0.999),7);
DRAWICON((王子14 OR 王子20),(REF(CLOSE,1) * 1.001),8);
DRAWTEXT_FIX(1,0,0,0,'上涨或震荡趋势中的买点更可靠');
DRAWTEXT_FIX(1,0,0.05,0,'下跌或震荡趋势中的卖点更可靠');
DRAWTEXT_FIX(1,0,0.1,0,'严格控制仓位');
二、通达信双涨停指标公式
VAR1:=COUNT((C/REF(C,1)-1)*100>9.8 AND H=C,10)=2;
VAR2:=BARSSINCEN((C/REF(C,1)-1)*100>9.8 AND H=C,10);
双涨停筑底:=VAR1 AND VAR2>2 AND ((C/REF(C,1)-1)*100>9.8 AND H=C);
STICKLINE(双涨停筑底,0,1,1,0),COLORCC00FF;
DRAWICON(双涨停筑底,0.9,17);
DRAWTEXT(双涨停筑底,0.5,'双涨停筑底'),COLORYELLOW;