HELP !!!! converter um indicador do MT4 para MT5. - página 3

 
10937:
Oh, você quer ver um delta como (diferença) e usá-lo para adivinhar de que forma o preço está mais inclinado )))))
Bem, esse é o primeiro pensamento que vem a um homem quando ele o menciona
 

Tentando testar o MT5.

No MT4 eu uso o indicador IchimokuAlert_v3

Tirei daquihttps://www.forex-tsd.com/forum/debates-discussions/1175-ichimoku-alert/page2#comment_418797

Que alguém com bons conhecimentos o converta para o MT5.

Tentei convertê-lo com metodologia a partir daqui http://metatrader5.blogspot.com/2009/10/rewrite-mql-4-to-mql-5-script.html

Compilar com 55 erros

Arquivos anexados:
 
Ваня:

Tentando testar o MT5.

No MT4 eu uso o indicador IchimokuAlert_v3

Tirei daqui https://www.forex-tsd.com/forum/debates-discussions/1175-ichimoku-alert/page2#comment_418797

Que alguém com bons conhecimentos o converta para o MT5.

Tentei convertê-lo com metodologia a partir daqui http://metatrader5.blogspot.com/2009/10/rewrite-mql-4-to-mql-5-script.html

Há 55 erros na compilação.

Será mais fácil abrir a Ishimoku a partir da entrega MT5.

E copie um bloco de código de seu alerta para dentro dele.

//----
   string Msg,Subj;
  
   if (AlertType == 1 || AlertType == 3)
   {
      if (Tenkan_Buffer[1]>Kijun_Buffer[1] && Tenkan_Buffer[2]<Kijun_Buffer[2] && !UptrendAlert1)
...
...
...
 
o_O:

será mais fácil para você abrir o Ishimoku a partir da entrega do mt5.

E copie um bloco de código para dentro dele a partir de seu alerta .

//----
   string Msg,Subj;
  
   if (AlertType == 1 || AlertType == 3)
   {
      if (Tenkan_Buffer[1]>Kijun_Buffer[1] && Tenkan_Buffer[2]<Kijun_Buffer[2] && !UptrendAlert1)
...
...
...

Obrigado! Bom homem.

Você pode me dizer entre que linhas este bloco de código deve ser inserido?

Coloco o bloco no final. Recebi 6 erros de compilação.

A culpa é toda sua.

136 linha if (AlertType == 1 || AlertType == 3)

156 linha if (AlertType == 2 || AlertType == 3)

175 linhas de retorno(taxas_total);

176 linha jura no suporte }

180 linha if (MsgAlerts) Alert(msgText);

181 linha se (eMailAlerts) SendMail(eMailSub, msgText);

//+------------------------------------------------------------------+
//|                                                     Ichimoku.mq5 |
//|                        Copyright 2009, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "2010, MetaQuotes Software Corp."
#property link      "http://www.mql5.com"
#property description "Ichimoku Kinko Hyo"
//--- indicator settings
#property indicator_chart_window
#property indicator_buffers 5
#property indicator_plots   4
#property indicator_type1   DRAW_LINE
#property indicator_type2   DRAW_LINE
#property indicator_type3   DRAW_FILLING
#property indicator_type4   DRAW_LINE
#property indicator_color1  Red
#property indicator_color2  Blue
#property indicator_color3  SandyBrown,Thistle
#property indicator_color4  Lime
#property indicator_label1  "Tenkan-sen"
#property indicator_label2  "Kijun-sen"
#property indicator_label3  "Senkou Span A;Senkou Span B"
#property indicator_label4  "Chikou Span"
//--- input parameters
input int InpTenkan=9;     // Tenkan-sen
input int InpKijun=26;     // Kijun-sen
input int InpSenkou=52;    // Senkou Span B
//--- indicator buffers
double    ExtTenkanBuffer[];
double    ExtKijunBuffer[];
double    ExtSpanABuffer[];
double    ExtSpanBBuffer[];
double    ExtChikouBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
void OnInit()
  {
//--- indicator buffers mapping
   SetIndexBuffer(0,ExtTenkanBuffer,INDICATOR_DATA);
   SetIndexBuffer(1,ExtKijunBuffer,INDICATOR_DATA);
   SetIndexBuffer(2,ExtSpanABuffer,INDICATOR_DATA);
   SetIndexBuffer(3,ExtSpanBBuffer,INDICATOR_DATA);
   SetIndexBuffer(4,ExtChikouBuffer,INDICATOR_DATA);
//---
   IndicatorSetInteger(INDICATOR_DIGITS,_Digits+1);
//--- sets first bar from what index will be drawn
   PlotIndexSetInteger(0,PLOT_DRAW_BEGIN,InpTenkan);
   PlotIndexSetInteger(1,PLOT_DRAW_BEGIN,InpKijun);
   PlotIndexSetInteger(2,PLOT_DRAW_BEGIN,InpSenkou-1);
//--- lines shifts when drawing
   PlotIndexSetInteger(2,PLOT_SHIFT,InpKijun);
   PlotIndexSetInteger(3,PLOT_SHIFT,-InpKijun);
//--- change labels for DataWindow
   PlotIndexSetString(0,PLOT_LABEL,"Tenkan-sen("+string(InpTenkan)+")");
   PlotIndexSetString(1,PLOT_LABEL,"Kijun-sen("+string(InpKijun)+")");
   PlotIndexSetString(2,PLOT_LABEL,"Senkou Span A;Senkou Span B("+string(InpSenkou)+")");
//--- initialization done
  }
//+------------------------------------------------------------------+
//| get highest value for range                                      |
//+------------------------------------------------------------------+
double Highest(const double&array[],int range,int fromIndex)
  {
   double res=0;
//---
   res=array[fromIndex];
   for(int i=fromIndex;i>fromIndex-range && i>=0;i--)
     {
      if(res<array[i]) res=array[i];
     }
//---
   return(res);
  }
//+------------------------------------------------------------------+
//| get lowest value for range                                       |
//+------------------------------------------------------------------+
double Lowest(const double&array[],int range,int fromIndex)
  {
   double res=0;
//---
   res=array[fromIndex];
   for(int i=fromIndex;i>fromIndex-range && i>=0;i--)
     {
      if(res>array[i]) res=array[i];
     }
//---
   return(res);
  }
//+------------------------------------------------------------------+
//| Ichimoku Kinko Hyo                                               |
//+------------------------------------------------------------------+
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 limit;
//---
   if(prev_calculated==0) limit=0;
   else                   limit=prev_calculated-1;
//---
   for(int i=limit;i<rates_total && !IsStopped();i++)
     {
      ExtChikouBuffer[i]=close[i];
      //--- tenkan sen
      double _high=Highest(high,InpTenkan,i);
      double _low=Lowest(low,InpTenkan,i);
      ExtTenkanBuffer[i]=(_high+_low)/2.0;
      //--- kijun sen
      _high=Highest(high,InpKijun,i);
      _low=Lowest(low,InpKijun,i);
      ExtKijunBuffer[i]=(_high+_low)/2.0;
      //--- senkou span a
      ExtSpanABuffer[i]=(ExtTenkanBuffer[i]+ExtKijunBuffer[i])/2.0;
      //--- senkou span b
      _high=Highest(high,InpSenkou,i);
      _low=Lowest(low,InpSenkou,i);
      ExtSpanBBuffer[i]=(_high+_low)/2.0;
     }
//--- done
   return(rates_total);
  }
//+------------------------------------------------------------------+

//----
   string Msg,Subj;
  
   if (AlertType == 1 || AlertType == 3)
   {
      if (Tenkan_Buffer[1]>Kijun_Buffer[1] && Tenkan_Buffer[2]<Kijun_Buffer[2] && !UptrendAlert1)
      {
         Subj = "Tenkan crosses Kijun: "+Symbol()+" on M"+Period();
         Msg = "BUY Signal --- : "+Subj+ " @ "+DoubleToStr(Close[1],Digits) + ", @ " + TimeToStr(TimeLocal(),TIME_SECONDS);
         UptrendAlert1 = true;
         DntrendAlert1 = false;
         DoAlerts(Msg,Subj);
      }
      if ( Tenkan_Buffer[1]<Kijun_Buffer[1] && Tenkan_Buffer[2]>Kijun_Buffer[2] && !DntrendAlert1)
      {  
         Subj = "Tenkan crosses Kijun: "+Symbol()+" on M"+Period();
         Msg = "SELL Signal --- : "+Subj+ " @ "+DoubleToStr(Close[1],Digits) + ", @ " + TimeToStr(TimeLocal(),TIME_SECONDS);
         UptrendAlert1 = false;
         DntrendAlert1 = true;
         DoAlerts(Msg,Subj);
      }
   }
  
   if (AlertType == 2 || AlertType == 3)
   {
      if (Close[1]>Close[1+Kijun] && Close[2]<Close[2+Kijun] && !UptrendAlert2)
      {
         Subj = "Kijun crossed Price: "+Symbol()+" on M"+Period();
         Msg = "BUY Signal --- : "+Subj+ " @ "+DoubleToStr(Close[1],Digits) + ", @ " + TimeToStr(TimeLocal(),TIME_SECONDS);
         DntrendAlert2 = false;
         UptrendAlert2 = true;
         DoAlerts(Msg,Subj);
      }
      if (Close[1]<Close[1+Kijun] && Close[2]>Close[2+Kijun] && !DntrendAlert2)
      {
         Subj = "Kijun crossed Price: "+Symbol()+" on M"+Period();
         Msg = "SELL Signal --- : "+Subj+ " @ "+DoubleToStr(Close[1],Digits) + ", @ " + TimeToStr(TimeLocal(),TIME_SECONDS);
         DntrendAlert2 = true;
         UptrendAlert2 = false;
         DoAlerts(Msg,Subj);
      }
   }
   return(rates_total);
}

void DoAlerts(string msgText, string eMailSub)
{
   if (MsgAlerts) Alert(msgText);
   if (eMailAlerts) SendMail(eMailSub, msgText);
}
//+------------------------------------------------------------------+
 
Ваня:

Obrigado! Bom homem.

Você pode me dizer entre que linhas este bloco de código deve ser inserido?

Entre em contato com o Freelance, eles inserirão peças de código nos lugares certos.
 
Evgeny Belyaev:
Vá até um freelancer, eles colocarão pedaços de código nos lugares certos.
Eu nem sei o que é "freelancer".
 
Ваня:
Eu nem sei o que é "freelancer".
Freelance.
 
Ваня:
Eu nem sei o que é "freelancer".
Agora você tem?
 
Evgeny Belyaev:
Agora você sabe?

Sim, tenho a impressão de que nos fios de língua russa a população deixa de entender a língua russa.

Esta linha "HELP !!!! para converter um indicador do MT4 para MT5.

Onde você aconselha ir?

Os termos de "freelance":

II. Processo de pedido

  1. Uma ordem passa pelas seguintes etapas no processo:
    1. Acordo de trabalho
    2. Acordo TOR
    3. Protótipo/Modelo
    4. Demonstração
    5. Entrega de trabalho
    6. Pagamento
 
Ваня:

Sim, tenho a impressão de que nos fios de língua russa a população deixa de entender a língua russa.

Esta linha "HELP !!!! para converter um indicador do MT4 para MT5.

Onde você aconselha ir?

Os termos de "freelance":

    1. Pagamento

Sim, imagine, o que você está sugerindo vale algum esforço e, portanto, dinheiro.

Todos entendem a língua russa, mas mexer em "por uma taxa" não é muito interessante.

Mas se você tivesse uma experiência comercial bem sucedida, na qual você precisaria de um indicador, talvez alguém concordasse em fazer algo sem dinheiro em troca de uma idéia comercial lucrativa. Mas enquanto isso - puramente pelo "bom nome" - temo que não haverá muitas pessoas dispostas a fazê-lo...