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.

Reply via email to