Getting started with an SMA crossover strategy

Systematic Trading Strategy idea

SMA crossover strategies are a great way to get started and understand the potential of systematic trading. Using two price lines of the SMA indicator, this strategy creates a buy or sell signal whenever the lines cross.

Buy - A slow SMA and a fast SMA (Meaning the look back periods are different). When the fast SMA crosses above the slower SMA from bottom to top (or from down to up), there is a buy signal as the trend is up.

Sell - When the fast SMA crosses from top to bottom (from up to down), there is a sell signal as the trend is down.

Learning exercise:

1. Search for an indicator and add it to your strategy

2. Delete an indicator using the cross icon

3. Duplicate an indicator using the copy icon.

How to build this strategy

Add 2 x SMA indicator blocks to your strategy and using the 'Period' field set the time frame for the slow SMA as 20 and the fast SMA as 10.

The small circle on either side of the blocks is for the inputs (left side) and outputs (right side), which should be used to connect to other blocks and ensure the data flows. The fields on the bottom of the block are called control fields and these can be used to configure the block settings.

Learning exercise:

1. Replace the SMA with a EMA of your choice

2. Click on a block output and drag a connection line

3. Test out the control fields of different blocks and change the parameters

Trading logic is required to transform the SMA data feeds into trading signals.

  1. Crosses Below will send a signal if a line crosses from top to bottom

  2. Crosses Above will send a signal if a line crosses from bottom to top

Our two new logic blocks have two inputs and two outputs, these are required to have connections to work correctly.

  1. The fast (10) SMA is the first input of "Crosses above", the slow (20) SMA is the second input. This means this block will emit a signal when the fast SMA crosses the slow SMA from bottom to top (Buy)

  2. The fast (10) SMA is the first input of "Crosses Below", the slow (20) SMA is the second input. This means this block will emit a signal when the fast SMA crosses the slow SMA from top to bottom (Sell)

If you have any questions or need any further technical support or assistance feel free to reach out to our team and we will get back to you as soon as we can.

Last updated

Was this helpful?