本帖最后由 小七哥 于 2017-11-12 13:19 编辑
盯盘系统自带副图指标公式:
VOLUME
VOLUME:VOL,VOLSTICK;
V5:MA(VOL,5);
V10:MA(VOL,10);
STICKLINE(PERIOD=5 AND CURRBARSCOUNT=1,VOLUME,KDAYVVOL,4,1),COLORGRAY;
================================================================
MACD
Y1:0;
SHORT:=12;
LONG:=26;
MID:=9;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
================================================================
RSI
Y1:50;
Y2:80;
Y3:20;
N1:=6;
N2:=12;
N3:=24;
LC:=REF(CLOSE,1);
RSI1:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
RSI2:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;
RSI3:SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100,COLORPURPLE;
================================================================
KDJ
Y1:50;
Y2:80;
Y3:20;
N:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1);
D:SMA(K,M2,1);
J:3*K-2*D,COLORPURPLE;
================================================================
CCI
YAXISAC:100,COLOR333399;
YAXISA0:0,COLOR222222;
YAXISDC:-100,COLOR339933;
N:=14;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:(TYP-MA(TYP,N))/(0.015*ADVDEV(TYP,N));
================================================================
WR
Y1:50;
Y2:80;
Y3:20;
N:=10;
N1:=6;
WR1:100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N));
WR2:100*(HHV(HIGH,N1)-CLOSE)/(HHV(HIGH,N1)-LLV(LOW,N1));
================================================================
DMI
N:=14;
MM:=6;
MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0 && HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0 && LD>HD,LD,0),N);
PDI:DMP*100/MTR;
MDI:DMM*100/MTR;
ADX:EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,MM);
ADXR:EXPMEMA(ADX,MM);
================================================================
OBV
M:=30;
VA:=IF(CLOSE>REF(CLOSE,1),VOL,-VOL);
OBV:SUM(IF(CLOSE=REF(CLOSE,1),0,VA),0);
MAOBV:MA(OBV,M);
================================================================
SST
LC:=REF(CLOSE,1);
MCV:=MA(CLOSE,5);
MCX:=MA(CLOSE,10);
MCN:=MA(CLOSE,20);
MCM:=MA(CLOSE,30);
MTR:=MAX(MAX((HIGH-LOW),ABS(LC-HIGH)),ABS(LC-LOW))/MCN;
KTR:=ABS(OPEN-CLOSE)*100/CLOSE;
CMIN:=MIN(MIN(MCV,MCX),MIN(MCN,MCM));
CMAX:=MAX(MAX(MCV,MCX),MAX(MCN,MCM));
STGR:=CLOSE>OPEN AND (CLOSE-CMAX)*100/CMAX >1.8;
STFL:=CLOSE>CMAX AND OPEN >CMAX; STTR:=CLOSE>CMAX AND (CLOSE-OPEN)*100/OPEN > 2;
BEST:=STGR OR STFL OR STTR;
CAIS:=(CMAX-CMIN)*100/CMIN;
CAI:SMA(CAIS,3,1);
XCD:IF(CAI<4,(CAI-3),DRAWNULL),COLORLIBLUE,STICK;
XCW:IF(CAI<4,CAI,DRAWNULL),COLORYELLOW,LINETHICK2;
XCM:IF(CAI<3,CAI,DRAWNULL),COLORRED,LINETHICK2;
RUN:IF(CAI<3 AND BEST, CAI, DRAWNULL),CIRCLEDOT,COLORRED;
KAI:MA(MTR*100,5), COLORLIBLUE;
KH:=MAX(CLOSE,OPEN); TCV:=IF(CLOSE>MCV,1,0);
TCX:=IF(CLOSE>MCX,1,0);
TCN:=IF(CLOSE>MCN,1,0);
TCS:=IF(CLOSE>MCM,1,0);
LPV:=IF(REF(KH,1)<REF(MCV,1),1,0);
LPX:=IF(REF(KH,1)<REF(MCX,1),1,0);
LPN:=IF(REF(KH,1)<REF(MCN,1),1,0);
LPS:=IF(REF(KH,1)<REF(MCM,1),1,0);
PPV:=IF(REF(KH,2)<REF(MCV,2),1,0);
PPX:=IF(REF(KH,2)<REF(MCX,2),1,0);
PPN:=IF(REF(KH,2)<REF(MCN,2),1,0);
PPS:=IF(REF(KH,2)<REF(MCM,2),1,0);
TCC:=TCV+TCX+TCN+TCS;
LPC:=LPV+LPX+LPN+LPS;
PCC:=PPV+PPX+PPN+PPS;
ROCKET:DRAWICON(TCC>2 AND (LPC>2 OR PCC>2), 5, 1);
|