title: How identify previous low or high from zigzag
body: <p>this is icustom calling function and get low ang high value.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>double highzigzag = iCustom(NULL,0,"ZigZag",InpDepth,InpDeviation,InpBackstep,1,0);
        double lowzigzag = iCustom(NULL,0,"ZigZag",InpDepth,InpDeviation,InpBackstep,2,0);</code></pre>
  </div>
  </div>
  </p>
  <p>And how can code previous low and high value to compare as</p>
  <p>if previous low &gt; current low  ,continue trend</p>
  <p>if previous low &lt; current low ,trend change</p>
  <p><a href="https://i.stack.imgur.com/kkBxW.png" rel="nofollow noreferrer">zigzag</a></p>