求帮忙做一个mt4指标:(2*收盘价-最高价-最低价)/(最高价-最低价),在单独的附图表中采用柱状图显示。

山东范二姐 2024-05-28 18:03:22
最佳回答
第一次写指标。。。  //+------------------------------------------------------------------+  //| qq 925515121.mq4 |  //+------------------------------------------------------------------+  #property indicator_separate_window  #property indicator_buffers 1  #property indicator_color1 silver  //---- buffers  double tempbuffer[];  //+------------------------------------------------------------------+  //| custom indicator initialization function |  //+------------------------------------------------------------------+  int init()  {  string short_name;  //---- 1 additional buffer used for counting.  indicatorbuffers(2);  indicatordigits(digits);  //---- indicator line  setindexstyle(0,draw_h**togram);  setindexbuffer(0,tempbuffer);  //---- name for datawindow and indicator subwindow label  short_name="qq:925515121";  indicatorshortname(short_name);  setindexlabel(0,short_name);  //----  return(0);  }  //+------------------------------------------------------------------+  //| bears power |  //+------------------------------------------------------------------+  int start()  {  int i,counted_bars=indicatorcounted();  //----  int limit=bars-counted_bars;  if(counted_bars>0) limit++;  for(i=0; i<limit; i++)  tempbuffer[i]=(2*iclose(**,0,i)-ihigh(**,0,i)-ilow(**,0,i))/(ihigh(**,0,i)-ilow(**,0,i));  //----  return(0);  }  //+------------------------------------------------------------------+ 20210311
汇率兑换计算器

类似问答
汇率兑换计算器

热门推荐
热门问答
最新问答
推荐问答
新手帮助
常见问题
房贷计算器-九子财经 | 备案号: 桂ICP备19010581号-1 商务联系 企鹅:2790-680461

特别声明:本网为公益网站,人人都可发布,所有内容为会员自行上传发布",本站不承担任何法律责任,如内容有该作者著作权或违规内容,请联系我们清空删除。