SMA cross
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​
Buy method conditions​
A buy order is allowed when the fast SMA line crosses over the slow SMA line.
Normal constraints like "buy once, sell once" don't apply to this strategy: each time buying criteria occur, Gunbot will place a buy order as high as set in your balance settings.
Sell method conditions​
A buy order is allowed when the fast SMA line crosses below the slow SMA line.
Gain protection is optional for this strategy. Be aware that this can lead to sell orders below your break-even point.
Trading example​
Example of how trading with this strategy can perform. Details and settings
The infographic below describes what triggers trades with this strategy.
Strategy settings for SMACross​
Buy settings​
Label | Config Parameter | Default Value | Detailed Description |
---|---|---|---|
Buy enabled | BUY_ENABLED | true | This setting allows you to enable or disable buy or long orders within the strategy. When enabled, the strategy can execute buy orders as dictated by its conditions. |
Single buy | SINGLE_BUY | false | Enabling this setting restricts the strategy to execute only one buy order. This can be useful if you prefer to limit your exposure to a single transaction at a time. |
Sell settings​
Label | Config Parameter | Default Value | Detailed Description |
---|---|---|---|
Sell enabled | SELL_ENABLED | true | This setting enables or disables the ability to make sell or short orders. When enabled, it allows the strategy to initiate sales according to its programmed conditions. |
Double check gain | DOUBLE_CHECK_GAIN | true | This setting ensures that a position has achieved a positive gain before it is sold. Disable this to allow the strategy's indicators to initiate a sale even at a loss, based on their assessments. |
Gain | GAIN | 1 | The target gain above break-even, set as a percentage. The default is set at 1%, with the ability to adjust between 0.1% to 5%. This setting helps to define the profit expectation before a sell order is executed. |
Count sell | COUNT_SELL | 9999 | Specifies the maximum number of sell orders that can be executed for a pair before the pair is disabled. This can be set anywhere from 1 to an effectively unlimited number (999999), with the default at 9999, allowing extensive trading before any restriction. |
Indicators​
Label | Config Parameter | Default Value | Detailed Description |
---|---|---|---|
Period | PERIOD | 15 minutes | The period setting determines the size of the candlesticks used for indicator calculation. It's essential to choose a value supported by your exchange, with the default set at 15 minutes. This impacts how the strategy interprets market conditions and timing. |
Slow SMA | SLOW_SMA | 20 | This setting defines the number of candles used to calculate the slow Simple Moving Average (SMA). |
Fast SMA | FAST_SMA | 10 | The number of candles used to calculate the fast Simple Moving Average (SMA) is set here. |
Overview of effects on different order types​
Config Parameter | Affected Order Types | Not Affected Order Types |
---|---|---|
Buy Enabled | Strategy buy, DCA buy, RT buy, RT buyback | Strategy sell, Stop limit, Close, RT sell |
Single Buy | Strategy buy | Strategy sell, Stop limit, Close, RT sell, DCA buy, RT buy, RT buyback |
Sell Enabled | Strategy sell, Stop limit, RT sell | Strategy buy, RT buy, RT buyback, Close, DCA buy |
Gain | Strategy sell | Strategy buy, RT buy, RT buyback, RT sell, Close, DCA buy, Stop limit |
Period | Strategy sell, Strategy buy, DCA buy (trigger) | RT buy, RT buyback, RT sell, Close, Stop limit |
Slow SMA | Strategy sell, Strategy buy | RT buy, RT buyback, RT sell, Close, Stop limit, DCA buy |
Fast SMA | Strategy sell, Strategy buy | RT buy, RT buyback, RT sell, Close, Stop limit, DCA buy |