How to find the last two ZigZag values? - page 2

 
hmrt135:
i think it must be code with <>0 for a specific period.

now stop thinking and do nothing trie to code

for every indicator you gonna use in EA's trie to read buffervalues

and look to objects it is giving on chart

search for the arrows of zigzag....

only the last value of zigzag can be repainted ....


void call_zigzag ()
{
//This function calls the custom indicator zigzag and returns it´s values. 
//THE INDICATOR ZIGZAG MUST BE IN THE FOLDER C:\...\MetaTrader 4\experts\indicators AND MUST BE NAMED "zigzag"!!!!
   int n, i = 0;
      while(n<6)
      {
      if(P0>0) {P5=P4; P4=P3; P3=P2; P2=P1; P1=P0; }
      P0=iCustom(Symbol(),0,"zigzag",ExtDepth,ExtDeviation,ExtBackstep,0,i);
      if(P0>0) {n+=1; }
      i++;
      }
}
 

Hi Tjipke de Vries,


please help me how to get the stochastic value from the ZigZag High-Low value.

like the pic below.

from the P0 to P5, i want to get the stochastic value.



Thank you very much,

Reason: