Code for EMA& Price comparison

Buy : When the Low of the Candle is above EMA 34 Close and the previous candle close is below EMA 34

Sell- When the high of the Candle is below EMA 34 close and the previous candle close is above EMA 34

1 Like
Buy; LOW > EMA(CLOSE, 34) AND REF (CLOSE, 1) < EMA (CLOSE, 34)

Sell; HIGH < EMA (CLOSE, 34) AND REF (CLOSE,1) > EMA (CLOSE,34)

i never try any Pi coding,backtesting and alerts as i know nothing is going to work out expect few moving averages and simple lines.