Gunbot wiki
Wiki em português
Russian
Russian
  • Добро пожаловать в Вики Gunbot
  • От переводчика
    • ReadMe - Прочти
  • About
    • Что нового?
      • Новое в версии 16
    • Поддерживаемые биржи
    • Системные Требования
  • Установка и Генеральные Настройки
    • Установка и запуск
      • Загрузка программного обеспечения
      • Установка в Windows
      • Установка macOS
      • Установка Linux
      • ARM installation
      • Как включить SSL / TLS
      • Запуск нескольких экземпляров
      • Безбашенный режим (Без GUI)
    • Preferences - Основные Настройки Бота
      • Bot settings - Настройки бота
      • Аутентификация
      • GUI notifications - GUI уведомления
      • Websockets
      • Telegram уведомления
      • TradingView (дополнение)
      • IMAP прослушиватель
    • Настройки биржи и ключи API
      • Подключение к бирже
        • Создание ключей API
        • Обмен свопами
      • GUNTHY кошелек
        • Как создать кошелек
  • КАК РАБОТАТЬ С GUNBOT
    • Изучение основ
      • Торговая логика
      • Важные настройки
      • Типы ордеров
      • Периоды
      • Trailing
      • ROE trailing
    • Редактирование стратегий и пар
      • Конфигуратор стратегий
      • Торговые пары
    • Мониторинг
    • AutoConfig - Автоконфигурации
  • СТРАТЕГИИ ДЛЯ ТРЕЙДИНГА
    • О стратегиях Gunbot
      • Trading methods - Торговые методы
      • Protections - Защита покупки
    • Обычные стратегии (спотовая торговля)
      • ADX
      • ATRTS - Средний истинный диапазон
      • Bollinger Bands - Полосы Боллинджера
      • Bollinger Bands (TA)
      • EMA spread
      • Emotionless
      • Gain
      • Ichimoku
      • MACD
      • MACDH
      • Pingpong
      • Stepgain
      • SMA cross
      • Tssl (trailing stop / stop limit)
      • TSA Time series analysis - Анализ временных рядов
    • Маржинальные торговые стратегии
      • ATRTS
      • ADX
      • Bollinger Bands
      • Bollinger Bands (TA)
      • EMA spread
      • Gain
      • Ichimoku
      • MACD
      • MACDH
      • Pingpong
      • Stepgain
      • SMA cross
      • Tssl (trailing stop / stop limit)
      • Time series analysis
    • Настройки баланса
    • Настройки Индикаторов
    • Dollar Cost Avg (DCA) - Усреднение
    • Reversal trading (RT) - Разворотная торговля
    • TrailMe
    • Misc settings - Разные настройки
  • ДОПОЛНИТЕЛЬНО
    • Backtesting - Тестирование
    • Торговая площадка
  • РАЗНОЕ
    • Backups - Резервные копии
    • Logs
    • Handling bags - Обработка сумок
    • Acronyms - Сокращения
    • Вики сообщества Gunbot
  • ИСПРАВЛЕНИЕ ПРОБЛЕМ
    • Critical errors - Критические ошибки
    • Если бот не торгует
    • Сброс пароля / 2FA
Powered by GitBook
On this page
  • How to work with this strategy
  • Long / Buy
  • Short / Sell
  • Close
  • Stop
  • Strategy parameters
  • Margin settings
  • ROE
  • Leverage
  • Stop Buy
  • Stop Sell
  • ROE Trailing
  • ROE Limit
  • Pre Order
  • Pre Order Gap
  • Buy settings
  • Buy enabled
  • NBA
  • Sell settings
  • Sell enabled
  • Indicator settings
  • Period
  • Balance settings
  • Confirming indicators + advanced indicator settings
  • Misc settings
  • Dollar cost avg settings
  • Reversal trading settings
  • TrailMe settings
  • Placeholders

Was this helpful?

  1. СТРАТЕГИИ ДЛЯ ТРЕЙДИНГА
  2. Маржинальные торговые стратегии

Time series analysis

This page describes how margin trading on Bitmex works with the TSA strategy. The triggers for trades are slightly different than in the same strategy for regular trading.

How to work with this strategy

Expected behavior for margin trading

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.

Please don't manually add to or reduce positions opened by Gunbot, unless you stop running Gunbot on this trading pair until you've closed this position.

Long / Buy

A long position is opened when the ask price crosses over the forecast.

Short / Sell

A short position is opened when the bid price crosses under the forecast.

Close

A position is closed when the desired ROE is reached.

Stop

A position is closed at loss when STOP_BUY or STOP_SELL is reached.

Strategy parameters

Following settings options are available for tsa and can be set in the strategy configurator of the GUI or the strategies section of the config.js file.

Margin settings

Margin settings control settings like leverage and the target for ROE. These parameters are relevant when using tsa as buy and/or sell method.

ROE

This sets the target for closing a position.

ROE is the Return On Equity for a position, the percentage profit and loss on your invested margin. This value is calculated in a similar way to how Bitmex calculates it, it does include leverage and does not include fees.

Examples: Long position, 1x leverage. When price moves 1% above the average entry price, 1% ROE is reached.

Long position, 100x leverage (or cross leverage). When price moves 1% above the average entry price, 100% ROE is reached.

Short position, 20x leverage When price moves 1% below the average entry price, 20% ROE is reached.

Values: numerical – represent a percentage.

Default value: 1

Parameter name in config.js: ROE

Leverage

Sets the leverage for opening any position. Setting 0 places the order with cross margin.

Values: numerical

Default value: 0

Parameter name in config.js: LEVERAGE

Stop Buy

Places a market stop order for a long position, at the same time as the position is opened.

When set to 1 and a long order is opened at a price of 100, a stop market order will be placed at 99.

Values: numerical - represents a percentage.

Default value: 0

Parameter name in config.js: STOP_BUY

Stop Sell

Places a market stop order for a short position, at the same time as the position is opened.

When set to 1 and a short order is opened at a price of 100, a stop market order will be placed at 101.

Values: numerical - represents a percentage.

Default value: 0

Parameter name in config.js: STOP_SELL

ROE Trailing

Use this to enable tssl-style trailing for ROE.

Values: true or false

Default value: false

Parameter name in config.js: ROE_TRAILING

ROE Limit

This sets the range for ROE trailing.

Setting a range of 5% at a ROE target of 1 would set an initial range between 0.95 and 1.05.

As long as ROE keeps increasing, the range moves along with ROE. As soon as ROE start decreasing, the lower range gets frozen. A close order is placed when ROE crosses the lower limit.

Values: numerical – represent a percentage of ROE.

Default value: 1

Parameter name in config.js: ROE_LIMIT

Pre Order

When set to true, limit orders will placed at a configurable rate beyond the best bid/ask price to get ahead of the order book.

Values: true or false

Default value: false

Parameter name in config.js: PRE_ORDER

Pre Order Gap

Sets the gap between the best bid/ask price in the orderbook and the rate at which a limit order gets placed. Long orders are placed at ask + gap. Short orders are placed at bid - gap.

It is possible to use negative values, this will increase the chance of receiving maker fees.

Example when set to 1 and a buy signal occurs at an ask price of 100: a limit order gets placed at a rate of 101. When set to -1 and a buy signal occurs at an ask price of 100: a limit order gets placed at a rate of 99.

Don't use a negative gap together with STOP_BUY and/or STOP_SELL, as these stops do not combine well with position that do not always fill. Instead use STOP_LIMIT.

Values: numerical - represents a percentage.

Default value: 0

Parameter name in config.js: PRE_ORDER_GAP

Buy settings

Buy settings are the primary trigger for opening long positions. These parameters control the execution of buy orders when using tsa as buy method.

Buy enabled

Set this to false to prevent Gunbot from placing buy orders.

Values: true or false

Default value: true

Parameter name in config.js: BUY_ENABLED

NBA

"Never Buy Above". Use this to only allow buy orders below the last sell rate.

This sets the minimum percentage difference between the last sell order and the next buy. The default setting of 0 disables this option.

When set to 1, Gunbot will only place a buy order when the strategy buy criteria meet and price is at least 1% below the last sell price.

Values: numerical, represents a percentage.

Default value: 0

Parameter name in config.js: NBA

Sell settings

Sell settings are the primary trigger for opening short positions. These parameters control the execution of sell orders when using tsa as sell method.

Sell enabled

Set this to false to prevent Gunbot from placing sell orders.

Values: true or false

Default value: true

Parameter name in config.js: SELL_ENABLED

Indicator settings

Relevant indicators for trading with tsa.

These settings have a direct effect on trading with tsa.

Period

This sets the candlestick period used for trading, this affects all indicators within the strategy.

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

Parameter name in config.js: PERIOD

Balance settings

Confirming indicators + advanced indicator settings

Misc settings

Dollar cost avg settings

DCA is not intented to be used for margin trading.

Reversal trading settings

RT is not intented to be used for margin trading.

TrailMe settings

TrailMe is not intended to be used with this strategy.

Placeholders

The following parameters in config.js have no function for this strategy and act as placeholder.

PreviousTssl (trailing stop / stop limit)NextНастройки баланса

Last updated 5 years ago

Was this helpful?

These settings are global and apply to all pairs running this strategy. When you want a specific parameter to be different for one or more pairs, use an at the pair level.

Using the BUY_METHOD and SELL_METHOD parameters you can combine different methods for buying and selling. This strategy page assumes both BUY_METHOD and SELL_METHOD are set to tsa. Accepted values are all strategy names as listed .

Only use .

override
here
supported values