Moving Average Cross

This example Strategy Buys when an instrument moves above the Exponential Moving Average and Sells when the instrument moves back below the EMA.

The rules are:

  • select stocks from the main NASDAQ exchanges
  • buy when the Close Price crosses above the 20 day Exponential Moving Average (and the Close Price has been below the EMA (20) for the prior 90 days)
  • sell when the Close Price crosses below the 20 day EMA
  • or close the position using a stop if it loses more than 10%
  • start with equity of 1,000,000
  • buy 10% of initial equity on each trade regardless of stock price or volatility
  • maintain no more than 5 open positions at a time, with a maximum of 2 new positions on any one day
  • when there are more buy signals than position slots available, choose stocks in descending order of 30 day Simple Moving Average Volume
  • exits, entries and stops can occur on any trading day during the test period.

Click 'Apply Changes & Run Test' under the 'Customize Criteria...' panel to adapt to your preferences and run tests.

Customize Criteria and Run Test
Show Criteria for: Buy Sell(1) Short Sell Cover Short
Create a long position when the following criteria is met
Close EMA (20) in lastbars
Close [-1] EMA (20) [-1] for lastbars
Enable and/or logic
1,000,000 10L % Starting Equity
5 Max. Open Positions 2 Max. New Positions in 1 day
Highest SMA (Volume 30)
Enter at Next Open Exit at Next Open
Stop 10L 10S % exit Stop
None set
60 Days - Latest
All Trading Days
Nasdaq GM Nasdaq GS
Buy: Close crossed above EMA (20) in last 1 bars and Close [-1] has been below EMA (20) [-1] for last 90 bars
Sell: Close crossed below EMA (20) in last 1 bars
Page size:
Page 1 of 1. Rows 1 to 1 of 1.
3/2/2015 8:36 AMComplete60 Days - Latest10L % Starting EquityHighest SMA (Volume 30)
Test Number 1Test Time 3/2/2015 8:36 AM
Test Status CompleteTest Period 60 Days - Latest
Starting Equity 1,000,000Position Sizing 10L % Starting Equity
Prioritize Symbols Highest SMA (Volume 30)Total Profit 16,399.66
Open Profit 0.00Return On Equity % 1.64
Annualized Return % 6.98Max Drawdown % -3.72
Sharpe Ratio0.00Number of Closed Trades 8
Percent Profitable 75.00Average Days in Trade 10.38
Winners Profit 36,398.50Losers Profit -19,998.84
Winning / Losing Profit Ratio 1.82Average Winning / Losing Profit Ratio 0.61
Number Of Winners 6Number Of Losers 2
Largest Winner Profit 10,440.00Largest Loser Profit -9,999.72
Average Winners Profit 6,066.42Average Losers Profit -9,999.42
Longest Winner Days 21Longest Loser Days 1
Average Length of Winning Trades 13.50Average Length of Losing Trades 1.00
Most Consecutive Winners 4Most Consecutive Losers 1