Logs

Reading Gunbot logs

Gunbot logs contain most of the information it works with. This article provides an overview of the different sections in these logs, and explains how to read them.

This article applies to all strategies except Emotionless, which has intentionally limited log output.

Log files per trading pair are automatically saved in the /logs folder and automatically rotated to zipped backups after reaching a filesize of 25MB. Up to three backup logfiles are kept per trading pair.

Trailing

When you are using a strategy that contains trailing, a few sections of a log cycle contain all information related to trailing.

Log entries for TrailMe trailing and TSSL look almost identical and follow the same logic, only the starting points for trailing are different.

image

Buy trailing

EntryDescription
TrailingBuy limitThe lower limit for trailing, as defined by the set buy range. This value is updated every cycle, following price movement for Last price.
Last priceCurrent lowest ask price.
Target to buyStarting point for buy trailing, a percentage from the lowest EMA as defined with BUY_LEVEL.
Stop limitThe upper limit for trailing, as defined by the set buy range. This value is updated every cycle, following price movement for Last price.

A buy order will occur when Last price crosses up Stop limit and is above lowest EMA.

When the logs state that the price is in range, that means the current price is between Stop limitand TrailingBuy limit.

Sell trailing

EntryDescription
TrailingStop limitThe upper limit for trailing, as defined by the set sell range. This value is updated every cycle, following price movement for Last price.
Last priceCurrent highest bid price.
Target to sellStarting point for sell trailing, a percentage from the averaged bought price as defined with GAIN.
StopLoss limitThe lower limit for trailing, as defined by the set sell range. This value is updated every cycle, following price movement for Last price.

A sell order will occur when Last price crosses down StopLoss limit after it was in range and respects GAIN.

When the logs state that the price is in range, that means the current price is between StopLoss limit and TrailingStop limit.

If you’ve set TSSL_TARGET_ONLY to false, sell orders would also be placed without respecting GAIN. This can only be used for TSSL, not for TrailMe

The “grid”

The so called grid area contains all information about core checks, indicators and trading checks. This section should always show for cycles processed correctly (except for emotionless, no grid is shown for this strategy).

image

Core checks

EntryDescription
Stop limit hitIndicates if current prices hit or exceeded the set STOP_LIMIT.
Can we buyShows YES when you don’t own quote currency and market conditions meet one or more of the strategy buying criteria.
Can we sellShows YES when you own quote currency and market conditions meet one or more of the strategy selling criteria.
Panic sellIndicates if PANIC_SELL is enabled or not.
Can averageWhen DOUBLE_UP is enabled, this shows YES when doubling up is possible according to DU_METHOD and DU_CAP_COUNT.
REVERSAL TRADEIndicated if a pair is in reversal trading. Shows YES when REVERSAL_TRADING is enabled and an RT_BUY has been performed and no buyback order took place yet.

Indicators

The indicators section shows all indicators as calculated by Gunbot.

Trading checks

EntryDescription
AskCurrent lowest ask price.
BidCurrent highest bid price.
Base BalanceTotal available balance of base currency.
Quote BalanceTotal available balance of quote currency.
Quote On OrdersAmount of quote currency currently in open orders.
BreakEven pointThe break-even point, including trading fees paid.
ENTRY POINTThe price to buy, according to your strategy settings. For example with a pure Bollinger Bands strategy, you’d see a price x% above the lower Bollinger Band. For strategies without a clear entry point, for example when additional confirming indicators are used, the price to buy according to BUY_LEVEL is shown here.
EXIT POINTThe price to sell, according to your strategy settings. For example with a pure Bollinger Bands strategy, you’d see a price x% below the upper Bollinger Band. For strategies without a clear exit point, for example when additional confirming indicators are used, the price to sell according to GAIN is shown here.
RT BUYThe price to buy for the next RT_BUY. When trailing is enabled this price is the starting point for trailing.
RT SELLThe price to buy for the next RT_SELL. When trailing is enabled this price is the starting point for trailing.
BUYBACKThe break-even point where reversal trading will buy back a bag to continue regular trading.
STOP LIMITThe stop limit calculated as average bought price minus STOP_LIMIT.
XTRENDShows the trend as measured by XTREND. Only used for Stepgain.
BAG VALUE IN BASEShows the value of your “bag” in base currency. It can happen that this value does not disappear after a sell order, this does not matter and it will be updated after the next buy order.
LAST TRADE P/LPercentage of profit or loss of the last strategy sell order.
BASE LAST TRADE P/LAbsolute profit or loss of the last strategy sell order.

Profit/Loss

This section shows accurate profit/loss statistics per trading pair. Fees are already deducted.

All trades fetched from the exchange are analysed, using IGNORE_TRADES_BEFORE can cause that only trades from a certain time and date are fetched and analysed.

EntryDescription
Pair P/LThe sum of all proceeds for a pair (buy orders have negative proceeds). Only realized P/L.
Normal TradingProfit/Loss for all trades except trades made during reversal trading. Buy orders without a sell order following are counted as unrealized profit, the full sum of the buy order is considered a loss.
Reversal TradingProfiti/Loss for trades made during reversal trading only. Buy orders without a sell order following are counted as unrealized profit, the full sum of the buy order is considered a loss.
Last 24hSame as Pair P/L, but filtered for trades made in the last 24 hours. Note that this can be wrong when multiple buy orders happened before selling and one or more of these fall outside the filtered time frame.
Last weekSame as Pair P/L, but filtered for trades made in the last 7 days. Note that this can be wrong when multiple buy orders happened before selling and one or more of these fall outside the filtered time frame.
Last monthSame as Pair P/L, but filtered for trades made in the last 30 days. Note that this can be wrong when multiple buy orders happened before selling and one or more of these fall outside the filtered time frame.