Skip to main content

Confirming indicators

To refine your derivatives trading strategy, various confirming indicators to validate long and short orders can be used. This article details the settings for these indicators.

Trades will only be executed when the main strategy and the confirmation indicators agree. If TrailMe is used, it must complete its trailing process and meet other criteria simultaneously. All these conditions must align within the same cycle.

When integrating TrailMe with confirming indicators, setting the indicators too tightly could prevent trades from executing, as all conditions must be met at the same time.


Indicators are calculated with live data

Gunbot calculates indicators using real-time data. For instance, in a 14-period RSI calculation, Gunbot uses the closing values of the past 13 completed candles and the live data from the current open candle to determine the indicator value.

Exchanges do not provide indicator data; instead, they supply the raw data needed for calculations. While Gunbot utilizes what we consider the best library for indicators, it's crucial to remember that exchanges or TradingView might show slightly different indicator values due to their calculation methods.


Confirming Indicators settings​

ADX (Average Directional Index)​

LabelConfig ParameterDefault ValueDetailed Description
ADX enabledADX_ENABLEDfalseEnables the ADX as a confirming indicator. This indicator assists in assessing the trend's strength, crucial for deciding on long or short orders.
ADX levelADX_LEVEL25Establishes the minimum trend strength necessary for engaging in trades. The ADX level ranges from 1 to 99, with higher values indicating stronger trends.
DI periodDI_PERIOD14Specifies the period over which the ADX is calculated, allowing you to tune the sensitivity of trend detection.

Stochastic Oscillator​

LabelConfig ParameterDefault ValueDetailed Description
Stoch enabledSTOCH_ENABLEDfalseActivates the Stochastic Oscillator as a confirming indicator, valuable for spotting overbought and oversold levels.
Stoch buy levelSTOCH_BUY_LEVEL30Specifies the maximum Stochastic value to allow long orders, identifying potential oversold conditions suitable for going long. Set -1001 to disable.
Stoch sell levelSTOCH_SELL_LEVEL70Defines the minimum Stochastic value for considering short orders, to capture overbought conditions likely preceding a price decline. Set -1001 to disable.
Stoch methodSTOCH_METHODoscillatorSelects the operational mode for the Stochastic indicator. Oscillator mode requires the Stoch value to remain within the specified range, whereas Cross mode activates when the Stoch crosses a threshold.
Stoch KSTOCH_K14Defines the timeframe for calculating the %K line of the Stochastic Oscillator, influencing its responsiveness to market changes.
Slow stoch KSLOW_STOCH_K3Determines the smoothing period for the %K line, impacting the indicator's sensitivity and smoothness.
Stoch DSTOCH_D3Sets the period for calculating the %D line, which is the moving average of the %K line, providing a reference for identifying crossovers and divergences.

RSI (Relative Strength Index)​

LabelConfig ParameterDefault ValueDetailed Description
RSI long enabledRSI_BUY_ENABLEDfalseActivates RSI as a confirming indicator for long orders. RSI evaluates the velocity and magnitude of price movements, helping identify potentially undervalued conditions for going long.
RSI buy levelRSI_BUY_LEVEL30Establishes the maximum RSI value to permit long orders. Lower RSI levels suggest oversold conditions and potential long opportunities.
RSI short enabledRSI_SELL_ENABLEDfalseActivates RSI as a confirming indicator for short orders. This setting aids in detecting when an asset is potentially overvalued, indicating a likelihood of price decline.
RSI sell levelRSI_SELL_LEVEL70Sets the minimum RSI value for initiating short orders. Higher RSI values suggest overbought conditions, signaling potential short opportunities.
RSI methodRSI_METHODoscillatorDefines the operational method for RSI: Oscillator mandates RSI to stay within a specified range, while Cross activates when RSI crosses a designated level.
RSI lengthRSI_LENGTH14Sets the number of candles for calculating RSI, affecting its sensitivity to price changes.

Stoch RSI (Stochastic Relative Strength Index)​

LabelConfig ParameterDefault ValueDetailed Description
Stoch RSI enabledSTOCHRSI_ENABLEDfalseActivates the Stoch RSI as a confirming indicator, beneficial for spotting more extreme overbought or oversold conditions compared to the traditional RSI.
Stoch RSI buy levelSTOCHRSI_BUY_LEVEL0.2Specifies the maximum Stoch RSI value for allowing long orders, targeting oversold conditions that may offer good long opportunities. Set -1001 to disable.
Stoch RSI sell levelSTOCHRSI_SELL_LEVEL0.8Defines the minimum Stoch RSI value for permitting short orders, aiming to identify overbought conditions likely to precede a price drop. Set -1001 to disable.
Stoch RSI methodSTOCHRSI_METHODoscillatorChooses the operational mode for Stoch RSI: Oscillator requires the indicator to be within a specified range for trades, while Cross triggers trades when the Stoch RSI crosses a predetermined level.
Stoch RSI lengthSTOCHRSI_LENGTH14Determines the number of candles used to calculate Stoch RSI, affecting how quickly the indicator responds to price changes.

MFI (Money Flow Index)​

LabelConfig ParameterDefault ValueDetailed Description
MFI enabledMFI_ENABLEDfalseEnables the Money Flow Index (MFI) as a confirming indicator, which uses both price and volume to measure buying and selling pressure, essential for derivatives trading.
MFI buy levelMFI_BUY_LEVEL30Sets the maximum MFI level at which long orders are allowed. Lower levels indicate potential oversold conditions, suggesting a buying opportunity. Set -1001 to disable.
MFI sell levelMFI_SELL_LEVEL70Defines the minimum MFI value at which short orders are considered. Higher values may indicate overbought conditions, suggesting a potential sell opportunity. Set -1001 to disable.
MFI lengthMFI_LENGTH14Determines the number of candles used to calculate the MFI. A longer length provides a smoother but slower-to-react indicator.

BTC PND Protection (Pump and Dump Protection for BTC)​

LabelConfig ParameterDefault ValueDetailed Description
BTC pnd protectionBTC_PND_PROTECTIONfalseActivates protection to prevent long orders during suspected pump and dump scenarios in the BTC/USD market, based on the Money Flow Index (MFI).
BTC pnd periodBTC_PND_PERIOD14Sets the MFI calculation period for the BTC pump and dump protection. This value adjusts the sensitivity of the MFI to recent price and volume changes.
BTC money flowBTC_MONEY_FLOW25Sets the MFI threshold for BTC/USD. If the MFI drops below this value, it may indicate a pump and dump event, triggering protection mechanisms.

EMA Spread​

LabelConfig ParameterDefault ValueDetailed Description
EMA spreadEMASPREADfalseLeverages the spread between the fast and medium Exponential Moving Averages (EMAs) as a confirming indicator for both long and short orders.
EMAxEMAx0.5Sets the minimum percentage difference required between the fast and medium EMAs to validate trade signals, essential in identifying notable trend strengths.

Other indicator settings​

LabelConfig ParameterDefault ValueDetailed Description
Standard deviationSTDV2Adjusts the multiplier for calculating the width of the Bollinger Bands, which are employed to gauge market volatility and potential price targets.
SMA periodSMAPERIOD50Specifies the period over which the Simple Moving Average (SMA) is calculated, impacting tools like Bollinger Bands and trend analysis.
Candles lengthCANDLES_LENGTH400Determines the amount of historical data requested from the exchange, crucial for computing various technical indicators.
EMA lengthEMA_LENGTH100Sets the period for calculating the Exponential Moving Average (EMA), influencing its responsiveness and delay in reflecting market changes.

Overview of effects on different order types​

Config ParameterAffected Order TypesNot Affected Order Types
ADX EnabledStrategy sell, Strategy buyClose, Stop limit, DCA buy
ADX LevelStrategy sell, Strategy buyClose, Stop limit, DCA buy
DI PeriodStrategy sell, Strategy buyClose, Stop limit, DCA buy
BTC PND ProtectionStrategy sell, Strategy buyClose, Stop limit, DCA buy
BTC Money FlowStrategy sell, Strategy buyClose, Stop limit, DCA buy
BTC PND PeriodStrategy sell, Strategy buyClose, Stop limit, DCA buy
EMA SpreadStrategy sell, Strategy buyClose, Stop limit, DCA buy
EMAxStrategy sell, Strategy buyClose, Stop limit, DCA buy
MFI EnabledStrategy sell, Strategy buyClose, Stop limit, DCA buy
MFI Buy LevelStrategy buyStrategy sell, Close, Stop limit, DCA buy
MFI Sell LevelStrategy sellStrategy buy, Close, Stop limit, DCA buy
MFI LengthStrategy sell, Strategy buyClose, Stop limit, DCA buy
RSI Buy EnabledStrategy buyStrategy sell, Close, Stop limit, DCA buy
RSI Sell EnabledStrategy sellStrategy buy, Close, Stop limit, DCA buy
RSI MethodStrategy sell, Strategy buyClose, Stop limit, DCA buy
RSI Buy LevelStrategy buyStrategy sell, Close, Stop limit, DCA buy
RSI Sell LevelStrategy sellStrategy buy, Close, Stop limit, DCA buy
RSI LengthStrategy sell, Strategy buyClose, Stop limit
Stoch EnabledStrategy buy, Strategy sellClose, Stop limit, DCA buy
Stoch MethodStrategy sell, Strategy buyClose, Stop limit, DCA buy
Stoch Buy LevelStrategy buyStrategy sell, Close, Stop limit, DCA buy
Stoch Sell LevelStrategy sellStrategy buy, Close, Stop limit, DCA buy
Stoch KStrategy sell, Strategy buyClose, Stop limit, DCA buy
Slow Stoch KStrategy sell, Strategy buyClose, Stop limit, DCA buy
Stoch DStrategy sell, Strategy buyClose, Stop limit, DCA buy
Stoch RSI EnabledStrategy buy, Strategy sellClose, Stop limit, DCA buy
Stoch RSI MethodStrategy sell, Strategy buyClose, Stop limit, DCA buy
Stoch RSI Buy LevelStrategy buyStrategy sell, Close, Stop limit, DCA buy
Stoch RSI Sell LevelStrategy sellStrategy buy, Close, Stop limit, DCA buy
Stoch RSI LengthStrategy sell, Strategy buyClose, Stop limit, DCA buy
EMA LengthStrategy sell, Strategy buyClose, Stop limit, DCA buy
Candles LengthStrategy sell, Strategy buy, DCA buyClose, Stop limit
SMA PeriodStrategy sell, Strategy buy, DCA buyClose, Stop limit
Standard DeviationStrategy sell, Strategy buy, DCA buyClose, Stop limit