Hi,
I have a scan that looks for stocks that have a 5, 10, 20 MA avg cross over. Pretty simple. What I'm looking for is how to update my scan so that I can find stocks that have recently done it within the last X bars on the daily timeframe. And vice versa if there's a bearish crossover. Here's my code for the postive crossover:
# Scan for stocks that are currently in triple crossover condition
def MAs = average(close, 5);
def MAm = average(close, 10);
def MAl = average(close, 20);
plot Edn = MAs > MAm and MAm > MAl;
Thanks
I have a scan that looks for stocks that have a 5, 10, 20 MA avg cross over. Pretty simple. What I'm looking for is how to update my scan so that I can find stocks that have recently done it within the last X bars on the daily timeframe. And vice versa if there's a bearish crossover. Here's my code for the postive crossover:
# Scan for stocks that are currently in triple crossover condition
def MAs = average(close, 5);
def MAm = average(close, 10);
def MAl = average(close, 20);
plot Edn = MAs > MAm and MAm > MAl;
Thanks