欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [求助]mt4指标,公式里的x值怎么改,谢谢

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有2167人关注过本帖树形打印复制链接

主题:[求助]mt4指标,公式里的x值怎么改,谢谢

帅哥哟,离线,有人找我吗?
banker2882
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:9 积分:2 威望:0 精华:0 注册:2013/1/26 12:26:35
[求助]mt4指标,公式里的x值怎么改,谢谢  发帖心情 Post By:2014/3/19 9:08:20    Post IP:175.25.241.2[只看该作者]

//+------------------------------------------------------------------+
//|                                                         1111.mq4 |
//|                       Copyright ?2011, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2011, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_separate_window

#property indicator_buffers 1
#property indicator_color1 Red

extern int MaxPer = 500;     //Maximal period analysed
extern int MinPer = 1;        //Minimal period analysed
extern int bar2update = 1;    //Nombre de barres entre chaque update

double FlatBuf[];  //Flattened close price buffer

int LastUpdate=0;
string ShName="";

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,FlatBuf);
   //Correct if needed MinPer and MaxPer
  if(MinPer<2) MinPer=2;
  if(MaxPer<MinPer) MaxPer=MinPer;
  //Correct if needed Bar2Update
  if(bar2update<0) bar2update=1;



//---- name for DataWindow and indicator subwindow label
   ShName=" 1111("+MinPer+" to "+MaxPer+" Periods)";
   IndicatorShortName(ShName);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
    
   //Check Enough Bars
   if(Bars<3*MaxPer)
   {
      Print(" Not Enough bars! - you need 3*MaxPer -> " + DoubleToStr(3*MaxPer,0));
      return(0);
   }
   else
      IndicatorShortName(ShName);
   
   //Check bar2update
   if(bar2update<1) bar2update=1;
   //Check Update needed
   if(Time[0]-LastUpdate>=bar2update*Period()*60)
   {
      LastUpdate=Time[0];
      
      //--- Call main function
      ComputeIt(1);
   }   
      
      
//----
   return(0);
  }
//+------------------------------------------------------------------+
int ComputeIt(int x)
{
   int i;
   int k;
   double a;
   double b;
   //---- Set flatBuf to 0
   for(i=0;i<=3*MaxPer+2;i++)
   {
      FlatBuf=0;
   }
   
   //Calculate flattened price
   a=Close[x+3*MaxPer-1];
   b=(Close[x]-a)/(x+3*MaxPer-2);      
   for(i=3*MaxPer;i>=1;i--)
      FlatBuf=Close[x+i-1]-(a+b*(3*MaxPer-i));
   return(0);
}

公式里的x值是什么  红色部分

 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2014/3/19 9:27:56    Post IP:58.246.57.26[只看该作者]

你这个怎么着也得发到MT4论坛吧?



金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部
帅哥哟,离线,有人找我吗?
banker2882
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:9 积分:2 威望:0 精华:0 注册:2013/1/26 12:26:35
[求助]mt4指标,公式里的x值怎么改,谢谢  发帖心情 Post By:2014/3/19 11:29:57    Post IP:175.25.241.2[只看该作者]

主要是我想改成金字塔指标,x那不知道如何改

 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2014/3/19 13:10:10    Post IP:58.246.57.26[只看该作者]

所以说你发到MT4论坛让人给你解释一下。。。你只发代码不发解释我们也看不懂。。。


金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部