mpsv 发表于 2018-6-16 22:05

通达信经典量价结合指标公式

VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,
VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主动卖盘:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),
IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2));
主动:=SUM(主动买盘,0)/SUM(主动卖盘,0)*-1;
低主5:=LLV(主动,5);
动比:=主动-低主5;
高动5:=6/HHV(动比,5);
主动心:=高动5*动比;
K1:=主动心+1-REF(主动心,1)>0;
K2:=主动心+1-REF(主动心,1)<0;
主动心向:=主动心*K1-主动心*K2;
{下面是量价了相合}
FF:=CLOSE-REF(CLOSE,1);
A:=MA(VOL*FF,2);
A0:=MA(VOL*FF,3);
A1:=MA(VOL*FF,5);
A2:=MA(VOL*FF,10);
A3:=MA(VOL*FF,20);
A4:=MA(VOL*FF,30);
B:=A-REF(A,1);
B0:=A0-REF(A0,1);
B1:=A1-REF(A1,1);
B2:=A2-REF(A2,1);
B3:=A3-REF(A3,1);
B4:=A3-REF(A4,1);
量价相合:(B>0)+(B0>0)+(B1>0)+(B2>0)+(B3>0)+(B4>0);
YES:(量价相合>1)*量价相合*(主动心向>1 OR 主动心>60);
IF(YES>=REF(YES,1),量价相合,DRAWNULL),COLORGREEN,LINETHICK2;
IF(YES>=REF(YES,1),YES,DRAWNULL),COLORRED,LINETHICK2;
周期1:IF(YES,BARSLAST(CROSS(YES,0.1))+1,0),COLORFF00FF,POINTDOT,LINETHICK0;
5,COLORGREEN;DRAWTEXT_FIX(C>O,0.01,0.9,0,'WWW.CXH99.COM'),COLORRED;
DRAWTEXT_FIX(C>O,1,1,0,'<span style="display:none;"><adata-cke-saved- >程序化交易模型</a></span>'),COLORRED;


恒强 发表于 2020-3-21 14:21

VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,
VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主动卖盘:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),
IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2));
主动:=SUM(主动买盘,0)/SUM(主动卖盘,0)*-1;

恒强 发表于 2020-3-21 14:59

VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,
VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主动卖盘:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),
IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2));
主动:=SUM(主动买盘,0)/SUM(主动卖盘,0)*-1;

恒强 发表于 2020-3-21 15:00

VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,
VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主动卖盘:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),
IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2));
主动:=SUM(主动买盘,0)/SUM(主动卖盘,0)*-1;

恒强 发表于 2020-3-21 15:18

VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,
VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主动卖盘:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),
IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2));
主动:=SUM(主动买盘,0)/SUM(主动卖盘,0)*-1;

恒强 发表于 2020-3-21 15:21

VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,
VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主动卖盘:=IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),
IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-VOL/2));
主动:=SUM(主动买盘,0)/SUM(主动卖盘,0)*-1;

szwzs 发表于 2020-3-21 17:47

想法很有创意呀

8515026 发表于 2020-3-23 09:24

感谢楼主分享

kjjzsl 发表于 2020-3-24 08:02


好好学习天天向上

szwzs 发表于 2020-3-24 14:04

贴个图出来看看跟金股格格的AAA区别在哪

鹤羽DOTA 发表于 2022-11-5 15:06

谢谢咯 哈哈

赵秀良 发表于 2022-12-20 09:29

谢谢分享谢谢分享

zjq613 发表于 2023-4-15 14:47

好好学习天天向上
页: [1]
查看完整版本: 通达信经典量价结合指标公式