if (ZigZag(DeviationType.Percent, 0.5, false).LowBar(0, 2, 100) < MAEnvelopes(0.1, 3, 60).Lower[2]
&& ZigZag(DeviationType.Percent, 0.5, false).HighBar(0, 1, 100) > MAEnvelopes(0.1, 3, 60).Upper[1]
&& ZigZag(DeviationType.Percent, 0.5, false).LowBar(0, 0, 100) > MAEnvelopes(0.1, 3, 60).Lower[0]
&& ZigZag(DeviationType.Percent, 0.5, false).LowBar(0, 0, 100) < MAEnvelopes(0.1, 3, 60).Upper[0])
I want to know whether the highs (or lows) - when they occur - are above (or below) the Envelope.
Unfortunately, the code doesn't help me here.
First of all I get an error for the first member of the equation, i.e. ZigZag(Deviation......), whose syntax is probably wrong (although I copied it from the HelpLine).
Furthermore, the second member (MAEnvelope(.....)) does identify the values of the Envelope lines, but everywhere - not when the ZigZag highs/lows occur, as I need for my comparations.
Please don't send me the usual link http://www.ninjatrader.com/support/forum/showthread.php?t=63231&goto=newpost,
since I already watched it without understanding anything of that page.
Comment