Discussion of article "The ZigZag Indicator: Fresh Approach and New Solutions" - page 2

Paulo Oliveira
Moderator
2892
Paulo Oliveira  
launic:

Formar o seu editor de ir verificar onde os indicadores são realmente armazenados

1. botão direito do mouse clique no arquivo de origem indicador

2. À esquerda, clique em Propriedades 

 

 3. Selecione a cópia valor Localização e colar na barra de endereços do Windows Explorer

 

Very Thanks Sir!

Now is working correct!

 

cenipenu
51
cenipenu  
Total newbie question but how can I use automate this EA to open positions based on the indicator???
Eric Pedron
224
Eric Pedron  

in the AdvancedZigZag.mqh i had to change


Line 74:   zzH[h]=(MqlZigZag)zz[i];  to     zzH[h].price=zz[i].value;

Line 80:   zzL[l]=(MqlZigZag)zz[i];    to    zzL[l].price=zz[i].value;


Also in the main program two_comment.mq5 the code block 

//--- check for integrity of preliminary calculations - the CopyBuffer function results in an error thus err=-1 and it returns thus the rest of the program does not execute..

I just commented out the error checking or just set int err=1 so the program block does not run. and now the EA works for me.


//--- check for integrity of preliminary calculations

   if(err<0)

     {

      //--- calculate the sums of deviations of the nodes from MA for ZigZag peaks

      ArrayInitialize(sumHi,0.0);

      for(int j=H-1; j>=0; j--)

        {

         for(int i=0; i<NUMBER_MA; i++)

           {

            err=CopyBuffer(handle_MA_H[i],0,Azz.zzH[j].t,1,MA);

            if(err<0) return;

            sumHi[i]+=Azz.zzH[j].price-MA[0];

            //Print("No error! sumHi: ", sumHi[i]);

           }

        }

      //--- calculate the sums of deviations of the nodes from MA for ZigZag troughs

      Print("Error Number: ", err);

      ArrayInitialize(sumLo,0.0);

      for(int j=L-1; j>=0; j--)

        {

         for(int i=0; i<NUMBER_MA; i++)

           {

            err=CopyBuffer(handle_MA_L[i],0,Azz.zzL[j].t,1,MA);

            if(err<0) return;

            sumLo[i]+=MA[0]-Azz.zzL[j].price;

           }

        }

     }

Juvenille Emperor Limited
Moderator
17966
Eleni Anna Branou  

Please use the </> button to insert your above code.


mannan033
16
mannan033  

Hi,

Can you please correct the source code and upload again?

I tried to compile and it showed 30 errors!

Thanks