量神三合一公式如下:
VAR11:=((((HIGH > LOW) AND (CLOSE > OPEN)) AND (HIGH = CLOSE)) AND (LOW = OPEN));
VAR12:=((VOL * (CLOSE - OPEN)) / (HIGH - LOW));
VD1:=IF(VAR11,VAR12,0);
VZ1:=IF(VAR11,0,0);
VAR21:=((((HIGH > LOW) AND (CLOSE > OPEN)) AND (HIGH = CLOSE)) AND (LOW < OPEN));
VAR22:=(VOL * (((CLOSE - OPEN) / (HIGH - LOW)) + (((2 / 3) * (OPEN - LOW)) / (HIGH - LOW))));
VAR23:=((((VOL * 1) / 3) * (OPEN - LOW)) / (HIGH - LOW));
VD2:=IF(VAR21,VAR22,0);
VZ2:=IF(VAR21,VAR23,0);
VAR31:=((((HIGH > LOW) AND (CLOSE > OPEN)) AND (HIGH > CLOSE)) AND (LOW = OPEN));
VAR32:=(VOL * (((CLOSE - OPEN) / (HIGH - LOW)) + (((1 / 3) * (HIGH - CLOSE)) / (HIGH - LOW))));
VAR33:=((((VOL * 2) / 3) * (HIGH - CLOSE)) / (HIGH - LOW));
VD3:=IF(VAR31,VAR32,0);
VZ3:=IF(VAR31,VAR33,0);
VAR41:=((((HIGH > LOW) AND (CLOSE > OPEN)) AND (HIGH > CLOSE)) AND (LOW < OPEN));
VAR42:=(VOL * ((((CLOSE - OPEN) / (HIGH - LOW)) + (((1 / 3) * (HIGH - CLOSE)) / (HIGH - LOW))) + (((2 / 3) * (OPEN - LOW)) / (HIGH - LOW))));
VAR43:=(VOL * ((((2 / 3) * (HIGH - CLOSE)) / (HIGH - LOW)) + (((1 / 3) * (OPEN - LOW)) / (HIGH - LOW))));
VD4:=IF(VAR41,VAR42,0);
VZ4:=IF(VAR41,VAR43,0);
VAR51:=((((HIGH > LOW) AND (CLOSE < OPEN)) AND (HIGH = OPEN)) AND (LOW = CLOSE));
VAR52:=((VOL * (OPEN - CLOSE)) / (HIGH - LOW));
VD5:=IF(VAR51,0,0);
VZ5:=IF(VAR51,VAR52,0);
VAR61:=((((HIGH > LOW) AND (CLOSE < OPEN)) AND (HIGH = OPEN)) AND (LOW < CLOSE));
VAR62:=((((VOL * (CLOSE - LOW)) / (HIGH - LOW)) * 2) / 3);
VAR63:=(VOL * (((OPEN - CLOSE) / (HIGH - LOW)) + (((1 / 3) * (CLOSE - LOW)) / (HIGH - LOW))));
VD6:=IF(VAR61,VAR62,0);
VZ6:=IF(VAR61,VAR63,0);
VAR71:=((((HIGH > LOW) AND (CLOSE < OPEN)) AND (HIGH > OPEN)) AND (LOW = CLOSE));
VAR72:=((((VOL * 1) / 3) * (HIGH - OPEN)) / (HIGH - LOW));
VAR73:=(VOL * (((OPEN - CLOSE) / (HIGH - LOW)) + (((2 / 3) * (HIGH - OPEN)) / (HIGH - LOW))));
VD7:=IF(VAR71,VAR72,0);
VZ7:=IF(VAR71,VAR73,0);
VAR81:=((((HIGH > LOW) AND (CLOSE < OPEN)) AND (HIGH > OPEN)) AND (LOW < CLOSE));
VAR82:=(VOL * ((((1 / 3) * (HIGH - OPEN)) / (HIGH - LOW)) + (((2 / 3) * (CLOSE - LOW)) / (HIGH - LOW))));
VAR83:=(VOL * ((((OPEN - CLOSE) / (HIGH - LOW)) + (((2 / 3) * (HIGH - OPEN)) / (HIGH - LOW))) + (((1 / 3) * (CLOSE - LOW)) / (HIGH - LOW))));
VD8:=IF(VAR81,VAR82,0);
VZ8:=IF(VAR81,VAR83,0);
VAR91:=((((HIGH > LOW) AND (CLOSE = OPEN)) AND (HIGH = CLOSE)) AND (LOW < CLOSE));
VAR92:=((VOL * 2) / 3);
VAR93:=((VOL * 1) / 3);
VD9:=IF(VAR91,VAR92,0);
VZ9:=IF(VAR91,VAR93,0);
VAR101:=((((HIGH > LOW) AND (CLOSE = OPEN)) AND (HIGH > CLOSE)) AND (LOW = CLOSE));
VAR102:=((((VOL * 1) / 3) * (HIGH - LOW)) / (HIGH - LOW));
VAR103:=((((VOL * 2) / 3) * (HIGH - LOW)) / (HIGH - LOW));
VD10:=IF(VAR101,VAR102,0);
VZ10:=IF(VAR101,VAR103,0);
VAR111:=((((HIGH > LOW) AND (CLOSE = OPEN)) AND (HIGH > CLOSE)) AND (LOW < CLOSE));
VAR112:=(VOL * ((((1 / 3) * (HIGH - CLOSE)) / (HIGH - LOW)) + (((2 / 3) * (CLOSE - LOW)) / (HIGH - LOW))));
VAR113:=(VOL * ((((2 / 3) * (HIGH - CLOSE)) / (HIGH - LOW)) + (((1 / 3) * (CLOSE - LOW)) / (HIGH - LOW))));
VD11:=IF(VAR111,VAR112,0);
VZ11:=IF(VAR111,VAR113,0);
VAR121:=(((((HIGH = LOW) AND (CLOSE = OPEN)) AND (HIGH = CLOSE)) AND (LOW = CLOSE)) AND ((((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)) * 100) > 9.75));
VD12:=IF(VAR121,VOL,0);
VAR122:=(((((HIGH = LOW) AND (CLOSE = OPEN)) AND (HIGH = CLOSE)) AND (LOW = CLOSE)) AND ((((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)) * 100) < (0 - 9.75)));
VZ12:=IF(VAR122,VOL,0);
VAR131:=((((((HIGH = LOW) AND (CLOSE = OPEN)) AND (HIGH = CLOSE)) AND (LOW = CLOSE)) AND ((((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)) * 100) < 9.75)) AND ((((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)) * 100) > (0 - 9.75)));
VD13:=IF(VAR131,(0.5 * VOL),0);
VAR132:=((((((HIGH = LOW) AND (CLOSE = OPEN)) AND (HIGH = CLOSE)) AND (LOW = CLOSE)) AND ((((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)) * 100) < 9.75)) AND ((((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)) * 100) > (0 - 9.75)));
VZ13:=IF(VAR132,(0.5 * VOL),0);
VD:=((((((((((((VD1 + VD2) + VD3) + VD4) + VD5) + VD6) + VD7) + VD8) + VD9) + VD10) + VD11) + VD12) + VD13);
VZ:=((((((((((((VZ1 + VZ2) + VZ3) + VZ4) + VZ5) + VZ6) + VZ7) + VZ8) + VZ9) + VZ10) + VZ11) + VZ12) + VZ13);
VAR10:=VD;//真神
VAR20:=VZ;//魔鬼
//量神正文
量比:V/MA(V,5),PRECISION2,COLORYELLOW,LINETHICK0;
//快牛与动能
DZCJL:=SUM(V,100);
HS:=IF(CLOSE=INDEXC,VOL/DZCJL*100,VOL/CAPITAL*100);
SCL:=SMA((VAR10-VAR20)*HS/100,13,1),LINETHICK0;
LCL:=SMA(SCL,6,1);
动能:SCL,PRECISION0,colorff00ff,LINETHICK0;
涨停:=(c-ref(c,1))/ref(c,1)*100;
DNYC:=SCL/LCL>=2.2 and (SCL>100 or 涨停>9.6);
DRAWICON(SCL/LCL>=2.2 and (SCL>100 or 涨停>9.6),V,6),align0,align4;//快牛与动能信号
//--------------------------
JX1:=BARSSINCE(VAR10);
JY1:=IF(121>JX1 AND JX1>0,JX1,120);
JY2:=IF(4>JX1 AND JX1>0,JX1,3);
VAR30:=MA(V,JY2);
动神:VAR10,PRECISION0,COLORBE,LINETHICK0;
鬼力:VAR20,PRECISION0,Coloraaaa00,LINETHICK0;
神比:=动神/VAR30;
鬼比:=鬼力/VAR30;
VAR2:=HIGH-LOW;
VAR3:=ABS(OPEN-CLOSE);
VAR4:=HIGH-IF(CLOSE>OPEN,CLOSE,OPEN);
VAR5:=IF(CLOSE>OPEN,OPEN,CLOSE)-LOW;
VAR6:=VAR3/VAR2*VOL;
VAR7:=VAR4/VAR2*VOL;
VAR8:=VAR5/VAR2*VOL;
VAR9:=IF(VOL/CAPITAL>0.001,1,EXP(ABS(LOG(VOL/CAPITAL*100))));
VARA:=(CLOSE-MA(CLOSE,5))/MA(CLOSE,5)*100;
VARB:=MA(CLOSE,5)>MA(CLOSE,10) AND MA(CLOSE,10)>MA(CLOSE,30) AND MA(CLOSE,30)>MA(CLOSE,60);
VARC:=MA(CLOSE,5)<MA(CLOSE,10) AND MA(CLOSE,10)<MA(CLOSE,30);
VAR40:=(IF(VAR6>=VAR7 AND VAR6>=VAR8 AND CLOSE>OPEN,VAR6,动神)+动神)/2;
VAR41:=(IF(VAR7>VAR6 AND VAR7>VAR8,VAR7,动神)+动神)/2;
VAR42:=(IF(VAR8>VAR6 AND VAR8>VAR7,VAR8,动神)+动神)/2;
VAR50:=(IF(VAR6>=VAR7 AND VAR6>=VAR8 AND CLOSE<OPEN,VAR6,鬼力)+鬼力)/2;
三上:MA((VAR40+VAR41+VAR42)/3,JY2),PRECISION0,LINETHICK0,color0000FF;//三日上攻
三下:MA(VAR50,JY2),PRECISION0,LINETHICK0,colorwhite;//三日下攻
十三量:MA(V,13),PRECISION0,colorcyan,LINETHICK0;
五五量:MA(V,55),PRECISION0,color00ffff,LINETHICK0;
STICKLINE(CLOSE>MA(CLOSE,30),0,VOL,8,0),COLOR0055AA,LINETHICK2;{多头}
STICKLINE(CLOSE>MA(CLOSE,30),0,VOL,7,0),COLOR0066BB,LINETHICK2;
STICKLINE(CLOSE>MA(CLOSE,30),0,VOL,6,0),COLOR0077CC,LINETHICK2;
STICKLINE(CLOSE>MA(CLOSE,30),0,VOL,5,0),COLOR0088DD,LINETHICK2;
STICKLINE(CLOSE>MA(CLOSE,30),0,VOL,4,0),COLOR0099EE,LINETHICK2;
STICKLINE(CLOSE>MA(CLOSE,30),0,VOL,3,0),COLOR00AAFF,LINETHICK2;
STICKLINE(CLOSE>MA(CLOSE,30),0,VOL,2,0),COLOR00BBFF,LINETHICK2;
STICKLINE(CLOSE>MA(CLOSE,30),0,VOL,1,0),COLOR00CCFF,LINETHICK2;
STICKLINE(CLOSE<MA(CLOSE,30),0,VOL,8,0),COLOR777777,LINETHICK2;{空头}
STICKLINE(CLOSE<MA(CLOSE,30),0,VOL,7,0),COLOR888888,LINETHICK2;
STICKLINE(CLOSE<MA(CLOSE,30),0,VOL,6,0),COLOR999999,LINETHICK2;
STICKLINE(CLOSE<MA(CLOSE,30),0,VOL,5,0),COLORAAAAAA,LINETHICK2;
STICKLINE(CLOSE<MA(CLOSE,30),0,VOL,4,0),COLORBBBBBB,LINETHICK2;
STICKLINE(CLOSE<MA(CLOSE,30),0,VOL,3,0),COLORCCCCCC,LINETHICK2;
STICKLINE(CLOSE<MA(CLOSE,30),0,VOL,2,0),COLORDDDDDD,LINETHICK2;
STICKLINE(CLOSE<MA(CLOSE,30),0,VOL,1,0),COLOREEEEEE,LINETHICK2;
STICKLINE(鬼力>0,鬼力,0,6,0),Color7B7b00,LINETHICK2;{下攻量鬼力}
STICKLINE(鬼力>0,鬼 |