Sample Trading Configs
Last updated
Last updated
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.
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.
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
.
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.
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
.
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.
The back-trading config uses the standard backtrading exchange class to run the trading.
The live trading config is for connecting to Binance Spot APIs.
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.
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
.
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.
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
.
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.