15分,30分,60分,以及日线虚拟成交量,副图,源码,有图
指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:0 Bytes
更新时间:2011-09-02 09:14:00
公式简介:
通达信自带的虚拟成交量,只能虚拟日线的。我今日写了个即能虚拟日线,也能虚拟15分、30分、以及60分图的成交量。
不知道是不是有高手有更简单的方法,如果有,别见笑哈。我可是把所有时间段逐一写出来的,费了不少时间呢。
源码如下:
K15F:=IF(PERIOD=2 AND CURRBARSCOUNT=1 AND DATE=CONST(DATE), 1, DRAWNULL);
K15FX0:=IF(K15F=1 AND TIME=94500, VOL*15/FROMOPEN, DRAWNULL);
K15FX1:=IF(K15F=1 AND TIME>=100000 AND TIME<=104500, VOL*15/(FROMOPEN-(TIME/100-1000+15)),DRAWNULL);
K15FX2:=IF(K15F=1 AND (TIME=110000 OR TIME=111500), VOL*15/(FROMOPEN-(TIME/100-1100+75)),DRAWNULL);
K15FX3:=IF(K15F=1 AND TIME>=130000 AND TIME<=134500, VOL*15/(FROMOPEN-(TIME/100-1300+105)),DRAWNULL);
K15FX4:=IF(K15F=1 AND TIME>=140000 AND TIME<=144500, VOL*15/(FROMOPEN-(TIME/100-1400+165)),DRAWNULL);
K15FX5:=IF(K15F=1 AND TIME=150000, VOL*15/(FROMOPEN-225),DRAWNULL);
STICKLINE(K15F=1 AND TIME=94500, K15FX0, 0, -1, -1), COLOR00C0C0;
STICKLINE(K15F=1 AND TIME>=100000 AND TIME<=104500, K15FX1, 0, -1, -1), COLOR00C0C0;
STICKLINE(K15F=1 AND (TIME=110000 OR TIME=111500), K15FX2, 0, -1, -1), COLOR00C0C0;
STICKLINE(K15F=1 AND TIME>=130000 AND TIME<=134500, K15FX3, 0, -1, -1), COLOR00C0C0;
STICKLINE(K15F=1 AND TIME>=140000 AND TIME<=144500, K15FX4, 0, -1, -1), COLOR00C0C0;
STICKLINE(K15F=1 AND TIME=150000, K15FX5, 0, -1, -1), COLOR00C0C0;
K30F:=IF(PERIOD=3 AND CURRBARSCOUNT=1 AND DATE=CONST(DATE), 1, 0);
K30FX1:=IF(K30F=1 AND (TIME=100000 OR TIME=103000), VOL*30/(FROMOPEN-(TIME/100-1000)),DRAWNULL);
K30FX2:=IF(K30F=1 AND TIME=110000, VOL*30/(FROMOPEN-60), DRAWNULL);
K30FX3:=IF(K30F=1 AND (TIME=130000 OR TIME=133000), VOL*30/(FROMOPEN-(TIME/100-1300+90)),DRAWNULL);
K30FX4:=IF(K30F=1 AND (TIME=140000 OR TIME=143000), VOL*30/(FROMOPEN-(TIME/100-1400+150)),DRAWNULL);
K30FX5:=IF(K30F=1 AND TIME=150000, VOL*30/(FROMOPEN-210), DRAWNULL);
STICKLINE(K30F=1 AND (TIME=100000 OR TIME=103000), K30FX1, 0, -1, -1), COLOR00C0C0;
STICKLINE(K30F=1 AND TIME=110000, K30FX2, 0, -1, -1), COLOR00C0C0;
STICKLINE(K30F=1 AND (TIME=130000 OR TIME=133000), K30FX3, 0, -1, -1), COLOR00C0C0;
STICKLINE(K30F=1 AND (TIME=140000 OR TIME=143000), K30FX4, 0, -1, -1), COLOR00C0C0;
STICKLINE(K30F=1 AND TIME=150000, K30FX5, 0, -1, -1), COLOR00C0C0;
K60F:=IF(PERIOD=4 AND CURRBARSCOUNT=1 AND DATE=CONST(DATE), 1, 0);
K60FX0:=IF(K60F=1 AND TIME=103000, VOL*60/(FROMOPEN-0), DRAWNULL);
K60FX1:=IF(K60F=1 AND TIME>=130000 AND TIME<=150000, VOL*60/(FROMOPEN-((TIME/10000-12)*60)), DRAWNULL);
STICKLINE(K60F=1 AND TIME=103000, K60FX0, 0, -1, -1), COLOR00C0C0;
STICKLINE(K60F=1 AND TIME>=130000 AND TIME<=150000, K60FX1, 0, -1, -1), COLOR00C0C0;
VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,VVOL,0,-1,-1),COLOR00C0C0;
VOLUME:VOL,VOLSTICK;
VOL5:MA(VOL,5),COLORWHITE;
VOL10:MA(VOL,10),COLORYELLOW;
[url=http://www.goodgupiao.com/gupiaogongshi/15325.html][B]15分,30分,60分,以及日线虚拟成交量,副图,源码,有图[/B][/url]