帮助升级到MetaTrader 5而没有损失 - 页 12

 
vdv2001:

对默里的水平进行了一下油漆处理

我下载了这个指标。我在编译时在第228行收到一个错误,我没能画出来,所以请相信我的话。我想使用我在MT5上使用的指标,这就是我在这里的原因,我自己做不到。也许你可以为我重写。我自己写不出来,谢谢你。
附加的文件:
 

下午好。聪明的人真的需要在MT5中翻译相关指标

附加的文件:
iCorel_v3.mq4  11 kb
 
这也是一个好的,有用的。这对每个人都有好处。
附加的文件:
 
为什么不划线?


#property indicator_chart_window
#property indicator_buffers 2
#property indicator_plots 2
#property indicator_color1 clrDeepSkyBlue
#property indicator_color2 clrDeepSkyBlue
#property indicator_chart_window
双倍UpBuffer[]。
双重DnBuffer[]。
int OnInit()
{
SetIndexBuffer(0,UpBuffer)。
SetIndexBuffer(1,DnBuffer)。
PlotIndexSetInteger(0,PLOT_DRAW_TYPE,DRAW_LINE); PlotIndexSetInteger(0,PLOT_DRAW_TYPE,PLOT_LINE_WIDTH,3); PlotIndexSetInteger(0,PLOT_DRAW_TYPE,DRAW_LINE) 。
PlotIndexSetInteger(1,PLOT_DRAW_TYPE,DRAW_LINE); PlotIndexSetInteger(1,PLOT_DRAW_TYPE,PLOT_LINE_WIDTH,3); PlotIndexSetInteger(1,PLOT_DRAW_TYPE,DRAW_LINE)。
return(0);
}
//+------------------------------------------------------------------+
//|自定义指标迭代函数|
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,const int prev_calculated,const datetime &time[],const double &open[],const double &high[],const double &low[],const double &close[],const long &tick_volume[],const long &volume[], const int &spread[])
{ int i;
for(i=1000;i>0;i--)
{ UpBuffer[i]=1.428;DnBuffer[i]=1.41。
}
return(0);
}
Документация по MQL5: Основы языка / Препроцессор / Свойства программ (#property)
Документация по MQL5: Основы языка / Препроцессор / Свойства программ (#property)
  • www.mql5.com
Основы языка / Препроцессор / Свойства программ (#property) - Документация по MQL5
 
fellow:
为什么不划线?



它应该是这样的,信不信由你,它正在发挥作用。

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_plots 2
#property indicator_color1 clrDeepSkyBlue
#property indicator_color2 clrDeepSkyBlue

double UpBuffer[];
double DnBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   SetIndexBuffer(0,UpBuffer);
   SetIndexBuffer(1,DnBuffer);

   PlotIndexSetInteger(0,PLOT_DRAW_TYPE,DRAW_LINE);
   PlotIndexSetInteger(0,PLOT_DRAW_TYPE,PLOT_LINE_WIDTH,3);

   PlotIndexSetInteger(1,PLOT_DRAW_TYPE,DRAW_LINE);
   PlotIndexSetInteger(1,PLOT_DRAW_TYPE,PLOT_LINE_WIDTH,3);

//---
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
   for(int i=rates_total-1000;i<rates_total;i++)
     {
      UpBuffer[i]=1.428;
      DnBuffer[i]=1.41;
     }
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+
 
voinG:
下载了这个指标。编译时,在第228行出现了错误,我无法制作图片,所以请相信我的话。我想使用我在MT5上使用的指标,这就是我在这里的原因,我自己做不到。也许你可以为我重写。谢谢你。
全部保存的行动是否完成?你能告诉我的任何事情。
 

请帮助。

试图改写WATL,几乎成功了。线条画得不对,这是因为LWMA计算歪了。而最重要的是,有时图中有这样的惊喜。

惊喜

一行小点有时与计算WATL的小点相同。

或者有时我旋转图形,点都重叠在相邻的条上。

提前感谢任何帮助 =)

附加的文件:
WATL.mq5  41 kb
 

也许谁在MQL5转换中看到过这个指标? http://www.kimiv.ru/index.php?option=com_remository&amp;Itemid=13&func=fileinfo&id=67

Автоматизация торговли на финансовых рынках - Скачать i-Spread3.rar
  • www.kimiv.ru
Оглавление файлового архива  Разработки на MQL4 Индикаторы   Очень хорошую доработку индикатора i-Spread предложил пользователь pavik. Суть доработки в добавлении отображения минимальных значений спрэда за последние час, четыре часа и сутки. А также...
 
帮助转换为mq5。没有它们,就像没有手一样!"。
 

你好。

我不能做我想做的事。

我的脑子里有一个不同的口型缓冲器,我有一副不同的,与我脑子里的那个不同。

[代码]
#属性 indicator_separate_window
#property indicator_buffers 6
#property indicator_plots 2
#属性 indicator_type1 DRAW_COLOR_LINE
#属性 indicator_type2 DRAW_COLOR_LINE
#property indicator_color1 clrBlue
#属性 indicator_color2 clrRed
#property indicator_style1 STYLE_SOLID
#property indicator_style2 STYLE_SOLID

输入 int period_1 = 20;
输入int period_2 = 100。
输入ENUM_MA_METHOD ma_method = MODE_SMA。
输入ENUM_APPLIED_PRICE applied_price = PRICE_CLOSE。

双倍ExtMapBuffer1[]。
双倍ExtMapBuffer2[]。
int EMHandle1=0。
int EMHandle2=0。
int EMHandle11=0。
int EMHandle22=0。
MqlParam params[]; // 用于保存指标参数的结构
double ma1[],ma2[],ma3[],ma4[];//时态缓冲器

int OnInit()
{
//------指标缓冲区的映射
SetIndexBuffer(0, ExtMapBuffer1, INDICATOR_DATA)。
SetIndexBuffer(1, ExtMapBuffer2, INDICATOR_DATA)。
SetIndexBuffer(2, ma1, INDICATOR_DATA)。
SetIndexBuffer(3, ma2, INDICATOR_DATA)。
SetIndexBuffer(4, ma3, INDICATOR_DATA)。
SetIndexBuffer(5, ma4, INDICATOR_DATA)。

PlotIndexSetInteger(0, PLOT_SHIFT, 0)。
PlotIndexSetInteger(1, PLOT_SHIFT, 0)。

PlotIndexSetInteger(0,PLOT_LINE_STYLE,STYLE_SOLID)。
PlotIndexSetInteger(1,PLOT_LINE_STYLE,STYLE_SOLID)。
//---
PlotIndexSetInteger(0,PLOT_LINE_COLOR,clrBlue)。
PlotIndexSetInteger(1,PLOT_LINE_COLOR,clrRed)。

PlotIndexSetInteger(0,PLOT_DRAW_TYPE,DRAW_LINE)。
PlotIndexSetInteger(1,PLOT_DRAW_TYPE,DRAW_LINE)。
IndicatorSetString(INDICATOR_SHORTNAME, "2_2_MA")。
//---设置精度
IndicatorSetInteger(INDICATOR_DIGITS,4)。
//---
ArrayResize(params,4)。
params[0].type =TYPE_INT;
params[0].integer_value=period_1。
// 偏移量
params[1].type =TYPE_INT。
params[1].integer_value=0。
// 计算方法:简单平均法
params[2].type =TYPE_INT。
params[2].integer_value=MODE_SMA。
// 用于计算的价格类型:收盘价
params[3].type =TYPE_INT。
params[3].integer_value=PRICE_CLOSE。

EMHandle1 = IndicatorCreate(_Symbol, 0, IND_MA, 4, params;)
ArrayResize(params,4)。
params[0].type =TYPE_INT;
params[0].integer_value=period_2。
params[1].type =TYPE_INT。
params[1].integer_value=0。
params[2].type =TYPE_INT。
params[2].integer_value=MODE_SMA。
params[3].type =TYPE_INT。
params[3].integer_value=PRICE_CLOSE。

EMHandle2 = IndicatorCreate(_Symbol, 0, IND_MA, 4, params;)
ArrayResize(params,4)。
params[0].type =TYPE_INT;
params[0].integer_value=period_1。
params[1].type =TYPE_INT。
params[1].integer_value=0。
params[2].type =TYPE_INT。
params[2].integer_value=MODE_SMA。
params[3].type =TYPE_INT。
params[3].integer_value=PRICE_CLOSE。

EMHandle11 = IndicatorCreate(_Symbol, 0, IND_MA, 4, params;)
ArrayResize(params,4)。
params[0].type =TYPE_INT;
params[0].integer_value=period_2。
params[1].type =TYPE_INT。
params[1].integer_value=0。
params[2].type =TYPE_INT。
params[2].integer_value=MODE_SMA。
params[3].type =TYPE_INT。
params[3].integer_value=PRICE_CLOSE。

EMHandle22 = IndicatorCreate(_Symbol, 0, IND_MA, 4, params;)

return(0);
}
int OnCalculate (const int rates_total,// size of array price[];
const int prev_calculated,//可用的条数;在之前的调用中。
const int begin,//价格[]数组中的哪个索引将开始有效数据。
const double &price[]) // array, on which the indicator will be calculated;
{
int i;
ArraySetAsSeries(ma1, true)。
ArraySetAsSeries(ma2, true)。
ArraySetAsSeries(ma3, true)。
ArraySetAsSeries(ma4, true)。

如果(CopyBuffer(EMHandle1, 0, 0, 1, ma1)<0){打印("CopyBuffer ma1 error =", GetLastError());}。
如果(CopyBuffer(EMHandle2, 0, 0, 1, ma2)<0){打印("CopyBuffer ma2 error =", GetLastError());}。
如果(CopyBuffer(EMHandle11, 0, 0, 1, ma3)<0){打印("CopyBuffer ma3 error =", GetLastError());}。
如果(CopyBuffer(EMHandle22, 0, 0, 0, 1, ma4)<0){打印("CopyBuffer ma4 error =", GetLastError());}。
int限制。
//if(prev_calculated<1)
//limit=period_1;
limit=prev_calculated-1。
for( i=0; i<limit; i++)
ExtMapBuffer1[0]=calculated。
ExtMapBuffer2[0]=calculate。

评论(
"\n=====================",
"/n ma1[0] : ",DoubleToString(ma1[0],5),
"/n ma2[0] : ",DoubleToString(ma2[0],5),
"/n ma3[0] : ",DoubleToString(ma3[0],5),
"/n ma4[0] : ",DoubleToString(ma4[0],5),
"/n ExtMapBuffer1[0] : ",DoubleToString(ExtMapBuffer1[0],4)。
"n ExtMapBuffer2[0] : ",DoubleToString(ExtMapBuffer2[0],4).
);
return(rate_total)。
}
空白的OnDeinit(const int reason)。
{
评论(")。
}
[/code]

当0代替i时(对于一个条形图)我看到了结果,当条形图(当前=i)显示我找不到第二对数据。

该货币对的图表是开放的,在市场窗口中,我不知道我在哪里混淆了事情。

一个指标中有两个不同的配对 - 那么我的错误在哪里?

我试着输入0,看到结果是注释,但我没有得到一行。

澄清一下:我把ma1和ma2放在一对,ma3和ma4放在另一对。

谢谢你。