1、分时主图指标"高抛低吸“
VAR0:=(BARSLAST(((HOUR = 9) AND (MINUTE = 31))) + 1);
VAR1:=((AMOUNT / VOL) / 100);
VAR2:=(SUM((CLOSE * VOL),0) / SUM(VOL,0));
VAR3:=(((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,COLORMAGENTA;
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,COLORMAGENTA;
VAR6:=IF(VAR3,VAR1,VAR2);
价位:CLOSE,LINETHICK4,COLORWHITE;
VAR8:="NCFSYY00.MACS#DAY";
VAR9:=(VAR8 * 1.3);
VAR10:=((CLOSE > REF(CLOSE,1)) AND ((CLOSE / VAR6) > (1 + (VAR8 / 100))));
VAR11:=((CLOSE < REF(CLOSE,1)) AND ((CLOSE / VAR6) < (1 - (VAR8 / 100))));
VAR12:=((REF(SUM(VAR10,0),1) = 0) AND (SUM(VAR10,0) = 1));
VAR13:=((REF(SUM(VAR11,0),1) = 0) AND (SUM(VAR11,0) = 1));
VAR14:=(SUM(VAR12,0) * CROSS(COUNT((CLOSE < REF(CLOSE,1)),BARSLAST(VAR12)),0.5));
VAR15:=(SUM(VAR13,0) * CROSS(COUNT((CLOSE > REF(CLOSE,1)),BARSLAST(VAR13)),0.5));
CS1:CONST(SUM(IF(VAR14,REF(CLOSE,1),DRAWNULL),0)),LINETHICK2,COLORGREEN;
CB1:CONST(SUM(IF(VAR15,REF(CLOSE,1),DRAWNULL),0)),LINETHICK2,COLORRED;
VAR18:=CROSS(SUM((VAR10 AND (CLOSE > (CS1 * (1 + (VAR9 / 100))))),0),0.5);
VAR19:=CROSS(SUM((VAR11 AND (CLOSE < (CB1 * (1 - (VAR9 / 100))))),0),0.5);
VAR20:=(SUM(VAR18,0) * CROSS(COUNT((CLOSE < REF(CLOSE,1)),BARSLAST(VAR18)),0.5));
VAR21:=(SUM(VAR19,0) * CROSS(COUNT((CLOSE > REF(CLOSE,1)),BARSLAST(VAR19)),0.5));
CS2:CONST(SUM(IF(VAR20,REF(CLOSE,1),DRAWNULL),0)),COLORGREEN;
CB2:CONST(SUM(IF(VAR21,REF(CLOSE,1),DRAWNULL),0)),COLORRED;
DRAWICON((VAR12 OR VAR18),(CLOSE * 1.001),39);
DRAWICON((VAR13 OR VAR19),(CLOSE * 0.999),38);
DRAWTEXT((VAR15 OR VAR21),REF(CLOSE,1) * 0.999,'低吸'),COLORRED;
DRAWTEXT((VAR14 OR VAR20),REF(CLOSE,1) * 1.001,'高抛');
均价:SUM(V*C,0)/SUM(V,0),COLORYELLOW;
2、”高抛低吸“指标引用指标”NCFSYY00“
VAR0:=REF(CLOSE,1);
VAR1:=REF(MAX(HIGH,VAR0),1);
VAR2:=REF(MIN(LOW,VAR0),1);
MACS:(MA((((VAR1 - VAR2) / REF(CLOSE,2)) * 100),5) / 4);
EMACS:(EMA((((VAR1 - VAR2) / REF(CLOSE,2)) * 100),5) / 4);
NOTEXT前收盘价:REF(CLOSE,1);
NOTEXT上市周期:BARSSINCE(CLOSE);
NOTEXTMA5:MA(CLOSE,5);
NOTEXTMA10:MA(CLOSE,10);
NOTEXTMA20:MA(CLOSE,20);
NOTEXTMA60:MA(CLOSE,60);
NOTEXTRMA5:REF(MA(CLOSE,5),1);
NOTEXTRMA10:REF(MA(CLOSE,10),1);
NOTEXTRMA20:REF(MA(CLOSE,20),1);
NOTEXTRMA60:REF(MA(CLOSE,60),1);
NOTEXT大盘价位:INDEXC;
NOTEXT昨日大盘:REF(INDEXC,1);
上一篇:通达信暴涨临界点源码 下一篇:通达信波段高手源码