到公式天堂来求助,望老师们帮帮忙(如图所示) [通达信]
-
咨询内容:
到公式天堂来求助,望老师们帮帮忙(如图所示)
想在看盘的分时图上有一个这样的公式,
希望老师们帮忙解决,十分感谢。
此主题相关图片如下mypicture2.gif:
-
通达信技术部:
先做一个子指标:ZST1
VOL0:VOL;
VOL1:REF(VOL,1);
VOL2:REF(VOL,2);
VOL3:REF(VOL,3);
VOL4:REF(VOL,4);MAXV:HHV(VOL,5);
R0:CLOSE>OPEN;
R1:REF(CLOSE,1)>REF(OPEN,1);
R2:REF(CLOSE,2)>REF(OPEN,2);
R3:REF(CLOSE,3)>REF(OPEN,3);
R4:REF(CLOSE,4)>REF(OPEN,4);
再做一个主图指标:ZSTM0:=ZST1.VOL0#DAY;
M1:=ZST1.VOL1#DAY;
M2:=ZST1.VOL2#DAY;
M3:=ZST1.VOL3#DAY;
M4:=ZST1.VOL4#DAY;
MAXV:=ZST1.MAXV#DAY;
R0:=ZST1.R0#DAY;
R1:=ZST1.R1#DAY;
R2:=ZST1.R2#DAY;
R3:=ZST1.R3#DAY;
R4:=ZST1.R4#DAY;
DRAWRECTREL(995,CONST(1000-(M0*500/MAXV)),1000,1000,IF(R0,RGB(255,0,0),RGB(0,128,0)));
DRAWRECTREL(985,CONST(1000-(M1*500/MAXV)),990,1000,IF(R1,RGB(255,0,0),RGB(0,128,0)));
DRAWRECTREL(975,CONST(1000-(M2*500/MAXV)),980,1000,IF(R2,RGB(255,0,0),RGB(0,128,0)));
DRAWRECTREL(965,CONST(1000-(M3*500/MAXV)),970,1000,IF(R3,RGB(255,0,0),RGB(0,128,0)));
DRAWRECTREL(955,CONST(1000-(M4*500/MAXV)),960,1000,IF(R4,RGB(255,0,0),RGB(0,128,0)));然后在分时图上使用此指标
此主题相关图片如下未命名3.png:
-
通达信客服:
沙发没有了,学习了。
-
网友交流:
沙发没有了,学习了。
-
网友交流:
依葫芦画瓢
在分时图显示10天内的成交量,已经成功,
源码如下:先建立一个小公式:
VOL0:VOL;
VOL1:REF(VOL,1);
VOL2:REF(VOL,2);
VOL3:REF(VOL,3);
VOL4:REF(VOL,4);
VOL5:REF(VOL,5);
VOL6:REF(VOL,6);
VOL7:REF(VOL,7);
VOL8:REF(VOL,8);
VOL9:REF(VOL,9);
VOL10:REF(VOL,10);
MAXV:HHV(VOL,10);
R0:CLOSE>OPEN;
R1:REF(CLOSE,1)>REF(OPEN,1);
R2:REF(CLOSE,2)>REF(OPEN,2);
R3:REF(CLOSE,3)>REF(OPEN,3);
R4:REF(CLOSE,4)>REF(OPEN,4);
R5:REF(CLOSE,5)>REF(OPEN,5);
R6:REF(CLOSE,6)>REF(OPEN,6);
R7:REF(CLOSE,7)>REF(OPEN,7);
R8:REF(CLOSE,8)>REF(OPEN,8);
R9:REF(CLOSE,9)>REF(OPEN,9);
R10:REF(CLOSE,10)>REF(OPEN,10);
再建立一个主图叠加公式
M0:=ZST1.VOL0#DAY;
M1:=ZST1.VOL1#DAY;
M2:=ZST1.VOL2#DAY;
M3:=ZST1.VOL3#DAY;
M4:=ZST1.VOL4#DAY;
M5:=ZST1.VOL5#DAY;
M6:=ZST1.VOL6#DAY;
M7:=ZST1.VOL7#DAY;
M8:=ZST1.VOL8#DAY;
M9:=ZST1.VOL9#DAY;
M10:=ZST1.VOL10#DAY;
MAXV:=ZST1.MAXV#DAY;
R0:=ZST1.R0#DAY;
R1:=ZST1.R1#DAY;
R2:=ZST1.R2#DAY;
R3:=ZST1.R3#DAY;
R4:=ZST1.R4#DAY;
R5:=ZST1.R5#DAY;
R6:=ZST1.R6#DAY;
R7:=ZST1.R7#DAY;
R8:=ZST1.R8#DAY;
R9:=ZST1.R9#DAY;
R10:=ZST1.R10#DAY;
DRAWRECTREL(995,CONST(1000-(M0*500/MAXV)),1000,1000,IF(R0,RGB(255,0,0),RGB(0,128,0)));
DRAWRECTREL(985,CONST(1000-(M1*500/MAXV)),990,1000,IF(R1,RGB(255,0,0),RGB(0,128,0)));
DRAWRECTREL(975,CONST(1000-(M2*500/MAXV)),980,1000,IF(R2,RGB(255,0,0),RGB(0,128,0)));
DRAWRECTREL(965,CONST(1000-(M3*500/MAXV)),970,1000,IF(R3,RGB(255,0,0),RGB(0,128,0)));
DRAWRECTREL(955,CONST(1000-(M4*500/MAXV)),960,1000,IF(R4,RGB(255,0,0),RGB(0,128,0)));
DRAWRECTREL(945,CONST(1000-(M5*500/MAXV)),950,1000,IF(R5,RGB(255,0,0),RGB(0,128,0)));
DRAWRECTREL(935,CONST(1000-(M6*500/MAXV)),940,1000,IF(R6,RGB(255,0,0),RGB(0,128,0)));
DRAWRECTREL(925,CONST(1000-(M7*500/MAXV)),930,1000,IF(R7,RGB(255,0,0),RGB(0,128,0)));
DRAWRECTREL(915,CONST(1000-(M8*500/MAXV)),920,1000,IF(R8,RGB(255,0,0),RGB(0,128,0)));
DRAWRECTREL(905,CONST(1000-(M9*500/MAXV)),910,1000,IF(R9,RGB(255,0,0),RGB(0,128,0)));
分时均价线:SUM(C*V,240)/SUM(V,240),COLORBROWN;即可达到如下图的效果
此主题相关图片如下mypicture2.gif:
如果以上指标公式不适用于您常用的行情软件
或者您想改编成选股公式,以便快速选出某种形态个股的话,
- 上一篇:请教我的通达信维赛特资讯模块不会更新信息
- 下一篇:没有了!
相关文章
-
没有相关内容