Buy = Sum(Close > EMA(Close, 50), 5) == 5; Same idea for Sell.
Mike --- In [email protected], "jh2222jh" <jh222...@...> wrote: > > How would I go about creating code to establish that my indicator must be X > for Y days before having the appropriate output? > > Simple example, buy = close above 50 EMA (after holding there for 5 days > continuously). > > Sell when close is below 50 EMA (after holding there for 5 days > consecutively). > > Is it just using an AND function? > > Muchos gracias. >
