SMA-Based Trading Strategy: Custom Parameters

Strategy parameters

Up to five symbols, separated by spaces or commas.

Customize your SMA strategy using the form. Choose the indicator period and thresholds, then set the dates and starting balance.

Parameter Guide

  • Time frame: choose up to five years, ending no later than yesterday.
  • Initial account balance: the cash available to all selected stocks.
  • SMA calculation period: 2–200 trading sessions; the default is 14.
  • Execution: signals use the daily close and fill at the next session’s open, when cash is available.

Buying Shares (Price Close to SMA)

The default rule buys one share for each session when the closing price is between 0% and 2% above its moving average. Change the buy threshold to test a different rule.

Selling Shares (Price Above SMA)

The default rule sells all held shares of a stock when the closing price is more than 5% above its moving average. The sell threshold must be higher than the buy threshold.

Prices are split-adjusted. The simulation excludes dividends, fees, slippage, taxes, and interest. Historical results do not predict future returns.

Back to basic SMA Strategy