In advanced code... will be able do something like: if (Any(1,5, Close>Open && Close>Close[1]))
... do something
which would mean if any of the candles from 1 back to 5 back are positive and close higher than previous one....
of course, if the condition doesn't fit exactly into an expression, can also do full code like this: if (Close.Any(1, 5, (i, x) =>
{
if (Close<=Open) return false;
return (Close>Close[i+1]);
}
);)
... do something
but that is more complex.