 | |  |  |
大智慧牛马熊指标添加显示百分比指标公式(源码 贴图)
股票总数是不断增加的,单纯只显示牛马熊股个数不足以判断大盘的顶低,因此添加几句代码,使之显示各自所占的百分比。
代码如下:
牛:selfdata('牛'),COLORRED;
马:selfdata('马'),COLORyellow;
熊:selfdata('熊'),COLORgreen;
总:=牛+马+熊;
NB:=牛/总*100;
MB:=马/总*100;
XB:=熊/总*100;
DRAWTEXTREL(10,1,NUMTOSTRN(NB,2)+'%'),COLORRED;
DRAWTEXTREL(20,1,NUMTOSTRN(MB,2)+'%'),COLORyellow;
DRAWTEXTREL(30,1,NUMTOSTRN(XB,2)+'%'),COLORgreen;
113431ux1uhc9ogjvo9zo8.png
|
| |  | |  |
|