任何菜鸟问题,为了不给论坛添乱。专业人士,不要路过。没有你就无处可去 - 6. - 页 525

 
是否可以从终端上传数据以便在Excel中处理?
 
AlexMikash:
我能否从终端卸下数据以便在Excel中处理?

通过......你可以。你弄错了,通过IE你可以。保存报告,在IE中打开它,并从那里将其转换为Excell格式。

我只做了一次,所以如果有什么不对,不要伤害,也许不记得什么不对。

 
AlexMikash:
是否可以从终端卸载数据以便在Excel中处理?

有这方面的脚本,你可以使用F2--导出。
 
谢谢你!)
 
tara:
我的孩子在弗拉门戈溜冰场跳舞。这样可以吗?

男孩,女孩?多大了?
 

我想写一个 关于 "Supertrend "指标的专家顾问

但它没有内置在MT4中,我不知道如何从该指标中获取数据。

您可以帮助我提供建议吗?

以下是指标 "Supertrend "的代码。

//+------------------------------------------------------------------+
//|                                                   Supertrend.mq4 |
//|                   Copyright © 2005, Jason Robinson (jnrtrading). |
//|                                      http://www.jnrtrading.co.uk |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, Jason Robinson (jnrtrading)."
#property link      "http://www.jnrtrading.co.uk"

#property indicator_chart_window
#property indicator_buffers 2
#property  indicator_color1 Lime
#property  indicator_color2 Red
#property  indicator_width1 2
#property  indicator_width2 2

double TrendUp[];
double TrendDown[];
int st = 0;
//extern int SlowerEMA = 6;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators

   //SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2);
   SetIndexBuffer(0, TrendUp);
   //SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 2);
   SetIndexBuffer(1, TrendDown);
   
   /*SetIndexStyle(0, DRAW_ARROW, EMPTY);
   SetIndexArrow(0, 159);
   SetIndexBuffer(0, TrendUp);
   SetIndexStyle(1, DRAW_ARROW, EMPTY);
   SetIndexArrow(1, 159);
   SetIndexBuffer(1, TrendDown);*/
   
   /*for(int i = 0; i < Bars; i++) {
      TrendUp[i] = NULL;
      TrendDown[i] = NULL;
   }*/
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- 
   /*for(int i = 0; i < Bars; i++) {
      TrendUp[i] = NULL;
      TrendDown[i] = NULL;
   }*/
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   
   int limit, i, counter;
   double Range, AvgRange, cciTrendNow, cciTrendPrevious, var;

   int counted_bars = IndicatorCounted();
//---- check for possible errors
   if(counted_bars < 0) return(-1);
//---- last counted bar will be recounted
   if(counted_bars > 0) counted_bars--;

   limit=Bars-counted_bars;
   
   for(i = limit; i >= 0; i--) {
      cciTrendNow = iCCI(NULL, 0, 50, PRICE_TYPICAL, i);
      cciTrendPrevious = iCCI(NULL, 0, 50, PRICE_TYPICAL, i+1);
      
      //st = st * 100;
      
      counter = i;
      Range = 0;
      AvgRange = 0;
      for (counter = i; counter >= i-9; counter--) {
         AvgRange = AvgRange + MathAbs(High[counter]-Low[counter]);
      }
      Range = AvgRange/10;
      if (cciTrendNow >= st && cciTrendPrevious < st) {
         TrendUp[i+1] = TrendDown[i+1];
      }
      
      if (cciTrendNow <= st && cciTrendPrevious > st) {
         TrendDown[i+1] = TrendUp[i+1];
      }
      
      if (cciTrendNow >= st) {
         TrendUp[i] = Low[i] - iATR(NULL, 0, 5, i);         
         if (TrendUp[i] < TrendUp[i+1]) {
            TrendUp[i] = TrendUp[i+1];
         }
      }
      else if (cciTrendNow <= st) {
         TrendDown[i] = High[i] + iATR(NULL, 0, 5, i);
         if (TrendDown[i] > TrendDown[i+1]) {
            TrendDown[i] = TrendDown[i+1];
         }
      }
   }
//----
   return(0);
  }
//+------------------------------------------------------------------+
 
culler:

我想写一个关于 "Supertrend "指标的专家顾问。

但它没有内置在MT4中,我不知道如何从该指标中获取数据。

您可以帮助我提供建议吗?

以下是指标 "Supertrend "的代码。


使用iCustom 函数获得自定义指标的数据
 
alsu:

自定义指标的数据是通过iCustom 函数获得的


我刚刚开始使用MQL4,我无法理解iCustom

谁能帮我从上面的"Supertrend " 指标代码中提取这些数据,以便我能够将其应用于专家顾问?

 
culler:


我刚刚开始使用MQL4,我不能iCustom 弄清楚它。

谁能帮我从上面的"Supertrend " 指标代码中提取数据,以便我可以在专家顾问中使用它?


好吧,你必须这样做,还能是什么呢?如果你想写一个专家顾问...

帮助中有一个例子,这样做:iCustom(symbol, timeframe, "Supertrend", you don't have special parameters, so let's skip this position, set the line number and number of bar you need)

 

在meta-iditor中,有一个提示功能,输入运算符,然后按F1.它说你需要输入运算符的一切。它是这样做的。

double UP=iCustom(Symbol(),NULL,"Supertrend",0,0);

double DOWN=iCustom(Symbol(),NULL,"Supertrend",1,0);