SMA cross (futures)
Gunbot uses a method that relies on Simple Moving Average (SMA) to determine when to buy and sell. This method works by identifying when prices begin to rise, as indicated by the fast SMA crossing over the slow SMA. Buying occurs at this point. On the other hand, selling takes place once the fast SMA crosses below the slow SMA.
Simple Moving Average (SMA) is a technical analysis indicator used to identify market trends. It calculates the average price of a security over a specified time period by summing up the closing prices and dividing the result by the number of periods. The result is a smooth line that indicates whether the market is trending upwards or downwards.
The method used by Gunbot leverages the crossover of two SMA lines to signal potential buying and selling opportunities. A "fast" SMA line is calculated based on a shorter time period, while a "slow" SMA line is calculated based on a longer time period. When the fast SMA crosses above the slow SMA, it indicates that the trend may be shifting upwards, and buying may be beneficial. Conversely, when the fast SMA crosses below the slow SMA, it indicates that the trend may be shifting downwards, and selling may be necessary. This method can help traders make more informed decisions based on market trends.
How to work with it​
Gunbot will open one position, either long or short, and close this position when the target is reached. When the stop is hit before profitably closing a trade, Gunbot will place a stop order at loss. After closing a position, Gunbot will again look to open a new long or short position. Gunbot will 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​
Label | Config Parameter | Default Value | Detailed Description |
---|---|---|---|
Buy enabled | BUY_ENABLED | true | When enabled, this setting allows the strategy to place buy or long orders. |
Short settings​
Label | Config Parameter | Default Value | Detailed Description |
---|---|---|---|
Sell enabled | SELL_ENABLED | true | This setting enables you to place sell or short orders, allowing for active selling as part of your trading strategy when conditions are met. |
Indicators​
Label | Config Parameter | Default Value | Detailed Description |
---|---|---|---|
Period | PERIOD | 15 | The period parameter determines the \"size\" of the candlesticks, in minutes, used for indicator calculations. Ensure you select a value supported by your exchange. This setting directly affects how quickly the strategy responds to price changes. |
Slow SMA | SLOW_SMA | 20 | The Slow SMA (Simple Moving Average) setting indicates the number of past candlesticks (over a defined period) used to calculate the average price for a 'slow' trend indicator. It helps in identifying the longer-term price trend. |
Fast SMA | FAST_SMA | 10 | The Fast SMA (Simple Moving Average) is calculated over fewer candlesticks compared to the Slow SMA, making it more responsive to recent price changes. This setting is crucial for detecting short-term trends and potential reversal points. |