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.
Buy settings
Buy settings are the primary trigger for buy orders. These parameters control the execution of buy orders when using smacross
as buy method.
Buy enabled
- Description
- Values
- Order types
- Name
Set this to false to prevent Gunbot from placing buy orders.
Values: true or false
Default value: true
Affects | Does not affect |
---|---|
Strategy buy | Strategy sell |
DCA buy | Stop limit |
RT buy | Close |
RT buyback | RT sell |
Parameter name in config.js
: BUY_ENABLED
Single Buy
- Description
- Values
- Order types
- Name
Enable this to restrict smacross
to placing just a single buy order on the first crossup, then it will go in sell mode.
Useful when you combine smacross
with a different sell method or use other parameters that prevents sell orders from happening at every crossdown.
Values: true or false
Default value: false
Affects | Does not affect |
---|---|
Strategy buy | Strategy sell |
Stop limit | |
Close | |
RT sell | |
DCA buy | |
RT buy | |
RT buyback |
Parameter name in config.js
: SINGLE_BUY
Sell settings
Sell settings are the primary trigger for sell orders. These parameters control the execution of sell orders when using smacross
as sell method.
Sell enabled
- Description
- Values
- Order types
- Name
Set this to false to prevent Gunbot from placing sell orders.
Values: true or false
Default value: true
Affects | Does not affect |
---|---|
Strategy sell | Strategy buy |
Stop limit | RT buy |
RT sell | RT buyback |
Close | |
DCA buy |
Parameter name in config.js
: SELL_ENABLED
Gain
- Description
- Values
- Order types
- Name
This sets the minimum target for selling when DOUBLE_CHECK_GAIN
is enabled.
Values: numerical – represents a percentage.
Default value: 0.5
Affects | Does not affect |
---|---|
Strategy sell | Strategy buy |
RT buy | |
RT buyback | |
RT sell | |
Close | |
DCA buy | |
Stop limit | |
Parameter name in config.js
: GAIN
Indicator settings
Relevant indicators for trading with SMA cross.
These settings have a direct effect on trading with smacross
.
Period
- Description
- Values
- Order types
- Name
This sets the candlestick period used for trading, this affects all indicators within the strategy.
Only use supported values. The trading settings editor suggests valid values for the selected exchange..
Setting a short period allows you to trade on shorter trends, but be aware that these will be noisier than longer periods.
Values: numerical– represents candlestick size in minutes.
Default value: 15
Affects | Does not affect |
---|---|
Strategy sell | RT buy |
Strategy buy | RT buyback |
DCA buy (when using an indicator to trigger) | RT sell |
Close | |
Stop limit |
Parameter name in config.js
: PERIOD
Slow SMA
- Description
- Values
- Order types
- Name
The number of periods used for calculating the slow SMA.
Values: numerical, represents a number of periods.
Default value: 2
Affects | Does not affect |
---|---|
Strategy sell | RT buy |
Strategy buy | RT buyback |
RT sell | |
Close | |
Stop limit | |
DCA buy |
Parameter name in config.js
: SLOW_SMA
Fast SMA
- Description
- Values
- Order types
- Name
The number of periods used for calculating the fast SMA.
Values: numerical, represents a number of periods.
Default value: 1
Affects | Does not affect |
---|---|
Strategy sell | RT buy |
Strategy buy | RT buyback |
RT sell | |
Close | |
Stop limit | |
DCA buy |
Parameter name in config.js
: FAST_SMA