Looking for a simple M.A. crossover scan (ie 10sma crosses 22ema) that is able to tell me 2 things:
1. How many days ago was the last crossover and 2. able to click in your spread sheet, starting from 0 (today crossover) on up.
Moving Average Crossover
Moderator: Chris White
-
- Posts: 212
- Joined: Mon Nov 29, 2010 9:21 pm
Re: Moving Average Crossover
You can use the built-in scan called 'MAU' (moving average crossing up) as a starting point for this. MAU uses two simple moving averages but it is easy to copy that script and modify the second moving average to be an exponential moving average like so:
Once this scan is in place you can add it to the 'Entries and Exits' scanner to generate a spreadsheet of all occurrences of the signals for any given list of stocks:
You can also add the script to a chart layout so that when you click on the signals in the spreadsheet and see a chart you have a visual reference for the current signal and all previous signals:
Give it a whirl!
Chris White
CEO, EdgeRater LLC
Code: Select all
Event:Cross(MA(C, FastPeriod),EMA(C,SlowPeriod));
You can also add the script to a chart layout so that when you click on the signals in the spreadsheet and see a chart you have a visual reference for the current signal and all previous signals:
Give it a whirl!
Chris White
CEO, EdgeRater LLC