ATS
  • Overview
  • Getting Started
    • Quickstart
    • Sample Trading Configs
  • Basics
    • Definitions & Terminology
    • What is Market Making
    • Plots
    • Trading Report
    • Architecture
    • Exchange Configs
    • Strategy Configs
    • Canonical Namespaces
  • APIs
    • Create Trading Job
    • List Trading Jobs
    • Run Trading Job
    • Stop Trading Job
    • Get Plot Topic List
    • Plot Topics
    • Realtime Logs
  • Customizations
    • Adding a New Exchange
    • Adding a Strategy
    • Adding an Indicator
    • Custom Fee Structures
    • Adding a New Plot
Powered by GitBook
On this page
  • Configuring a Strategy
  • Simple Moving Average Strategy
  • Simple LSTM Strategy
  1. Getting Started

Sample Trading Configs

PreviousQuickstartNextDefinitions & Terminology

Last updated 7 months ago

Configuring a Strategy

You can configure strategies through our APIs or the simple trading UI. Following diagrams illustrates how to add or edit strategies.

Once you choose to add or edit the trading configs, you will get a window where you can configure Exchange Configs, Strategy Configs and Plotting Configs.


Simple Moving Average Strategy

This strategy places buy and sell orders based on a combination of moving average (MA) signals and a secondary confirmation signal using either the Relative Strength Index (RSI) or On-Balance Volume (OBV). It supports trading in both long and short positions, with configurable parameters to suit individual needs.

Note: This implementation is intended as a demonstration and should not be considered a complete or fully optimized trading strategy. It serves to illustrate the combination of moving average signals and secondary indicators for educational and exploratory purposes.

Trading Modes:

  • The strategy supports trading both long and short positions, determined by the go_long and go_short parameters. By default, go_long=True and go_short=False.

Signal Generation:

  1. Primary Signal - Moving Average Crossover:

    • A primary buy signal is generated when the fast (short) MA crosses above the slow (long) MA.

    • A primary sell signal is generated when the fast MA crosses below the slow MA.

  2. Secondary Signal Confirmation:

    • A secondary confirmation is performed using either the OBV or RSI indicator based on the configuration (use_obv parameter).

    • If use_obv=True, the OBV indicator is used for confirmation:

      • A buy signal is triggered if the current timestep's OBV change is the maximum within the past obv_window_length changes.

      • A sell signal is triggered if the current timestep's OBV change is the minimum within the same window.

    • If use_obv=False (default), the RSI indicator is used for confirmation:

      • A buy signal is triggered when RSI > 100 + rsi_d.

      • A sell signal is triggered when RSI < rsi_d.

Exit Conditions:

  • The exit points for trades are determined by take-profit (TP) and stop-loss (SL) levels, which are calculated as multiples of market volatility. The tp_multiple and sl_multiple parameters control the magnitude of these levels.

Trading Job Config - Back Trading

The back-trading config uses the standard backtrading exchange class to run the trading.

Trading Job Config - Live Trading

The live trading config is for connecting to Binance Spot APIs.

Plot Config - Back Trading

Plot Config - Live Trading

Simple LSTM Strategy

This strategy places buy and sell orders based on signals generated by an AI model, with additional confirmation from either the Relative Strength Index (RSI) or On-Balance Volume (OBV). The strategy is configurable to trade in both long and short positions.

Note: This implementation is meant for demonstration purposes and should not be considered a fully developed or optimized trading strategy. It is designed to illustrate the use of AI-based signals combined with traditional indicators.

Trading Modes:

  • The strategy supports trading both long and short positions, which are controlled by the go_long and go_short parameters. By default, go_long=True and go_short=False.

Signal Generation:

  1. Primary Signal - AI Model Output:

    • The primary signal is derived from the output of the AI model.

    • If the AI model's output (ai_val) is 1, a buy signal is generated.

    • If the AI model's output (ai_val) is 2, a sell signal is generated.

  2. Secondary Signal Confirmation:

    • A secondary confirmation is performed using either the OBV or RSI indicator based on the use_obv configuration.

    • If use_obv=True, the OBV indicator is utilized:

      • A buy signal is confirmed if the current timestep's OBV change is the maximum within the past obv_window_length changes.

      • A sell signal is confirmed if the current timestep's OBV change is the minimum within the same window.

    • If use_obv=False (default), the RSI indicator is utilized:

      • A buy signal is confirmed when RSI > 100 + rsi_d.

      • A sell signal is confirmed when RSI < rsi_d.

Exit Conditions:

  • The exit strategy uses take-profit (TP) and stop-loss (SL) levels, which are determined as multiples of market volatility. These are controlled by the tp_multiple and sl_multiple parameters.

Trading Job Config - Back Trading

Trading Job Config - Live Trading

Plot Config - Back Trading

Plot Config - Live Trading

2KB
job_config_simple_ma.json
1KB
job_config_simple_ma.json
5KB
plot_config_simple_ma.json
5KB
plot_config_simple_ma.json
2KB
job_config_lstm_strategy.json
1KB
job_config_lstm_strategy.json
5KB
plot_config_lstm_strategy.json
5KB
plot_config_lstm_strategy.json
Trading UI: Adding a trade config
Trading UI: Editing a trade config
Trading Config UI