I don't understand your explanation. However, the easiest way to check and code this is to find some appropriate data, and plot the various elements that will make up your final condition... by doing this you can correctly build the correct logic and order.
--- In [email protected], "murthysuresh" <mo...@...> wrote: > > that will not work. example data is as below > > 210 200 270 220 190 160 100 90 110 > valid > 210 200 270 220 190 160 100 89 110 > invalid > > > > --- In [email protected], "sidhartha70" <sidhartha70@> wrote: > > > > Just a guess but try this... > > > > BarsSinceCCICrossed200andBelow90= BarsSince(BarsSinceCCICrossed200 AND > > Cross(90,array)); > > > > --- In [email protected], "murthysuresh" <money@> wrote: > > > > > > the CCI should have crossed 200. Once it crossed 200, it should have have > > > crossed below 90. > > > i got the first one right as below > > > array = CCI( 20 ); > > > BarsSinceCCICrossed200=BarsSince(Cross(array,200)); > > > > > > without using a for loop, how can i code the second condition. > > > Once it crossed 200, it should have have crossed below 90. > > > > > >
