Moving Average Crossover

A forum for all EdgeRater users

Moderator: Chris White

Post Reply
zztopband
Posts: 8
Joined: Tue Nov 15, 2011 2:01 pm

Moving Average Crossover

Post by zztopband »

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.
Chris White
Posts: 201
Joined: Mon Nov 29, 2010 9:21 pm

Re: Moving Average Crossover

Post by Chris White »

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:

Code: Select all

Event:Cross(MA(C, FastPeriod),EMA(C,SlowPeriod));
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:
Spreadsheet showing all signals for this scan
Spreadsheet showing all signals for this scan
smacrossema_grid.png (42.14 KiB) Viewed 9045 times
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:
Chart with scan added to a chart area
Chart with scan added to a chart area
smacrossema_chart.png (59.04 KiB) Viewed 9045 times
Give it a whirl!

Chris White
CEO, EdgeRater LLC
Post Reply