Create backtesting strategy based on EMA indicator

T

Tacoloco

New member
this is a buy order
def EMA8 = ExpAverage(close, 8);
def EMA21 = ExpAverage(close, 21);
def EMA34 = ExpAverage(close, 34);
def stacked = if EMA8<EMA21 and EMA21<EMA34 then 1 else 0;

plot signal = if stacked and close => EMA34 then 1 else 0;
----------------------------------------------
need help to create SELL order base on above code
 

Similar threads

Top