Hi! im trying to develop an strategy based on moving averages and i wanted to access to the past data to know when one line cross the other , to do something like that on mql4
buffer0[i+1]>buffer1[i+1] && buffer1[i]>buffer0[i]
Is something like that on quantopia? i can only access to the most recent moving average but no the previous
ema1 = ta.EMA(timeperiod1=3)
ema1data= ema1(data)
moving_average1 = ema1data[context.stock]# The stocks 3 day moving average
thank you for your help
Javier