Skip to main content

SMA cross (futures)

This method uses Simple Moving Average (SMA) crossovers to trigger entries. A fast SMA is calculated over fewer candles than the slow SMA. When the fast SMA crosses above the slow SMA, the strategy allows a long entry. When the fast SMA crosses below the slow SMA, the strategy allows a short entry.

How to work with it

Gunbot opens one position, either long or short, and closes it when the target is reached. If the stop triggers before a profitable close, Gunbot places a stop order at a loss. After closing a position, Gunbot looks to open a new long or short position. Gunbot does not add to existing open positions.

Buy method conditions

Opening a long position is allowed when FAST_SMA crosses over SLOW_SMA.

Sell method conditions

Opening a short position is allowed when FAST_SMA crosses down SLOW_SMA.

Conditions to close

Position is closed when the desired ROE (return on equity) is reached. This is a percentage from the entry point, taking leverage into consideration.

Conditions to stop

A position is closed at loss when negative ROE reaches the STOP_LIMIT target.

Strategy settings for SMACross (futures)

Long settings

LabelConfig ParameterDefault ValueDetailed Description
Buy enabledBUY_ENABLEDtrueWhen enabled, this setting allows the strategy to place buy or long orders.

Short settings

LabelConfig ParameterDefault ValueDetailed Description
Sell enabledSELL_ENABLEDtrueThis setting enables you to place sell or short orders, allowing for active selling as part of your trading strategy when conditions are met.

Indicators

LabelConfig ParameterDefault ValueDetailed Description
PeriodPERIOD15The period parameter determines the \"size\" of the candlesticks, in minutes, used for indicator calculations. Select a value supported by your exchange. This setting affects how quickly the strategy responds to price changes.
Slow SMASLOW_SMA20The Slow SMA (Simple Moving Average) setting indicates the number of past candlesticks used to calculate the average price for a slow trend indicator. It helps identify the longer-term price trend.
Fast SMAFAST_SMA10The Fast SMA (Simple Moving Average) is calculated over fewer candlesticks than the Slow SMA, making it more responsive to recent price changes.