Introduction

The BATT Bot provides an advanced trading system that allows users to define custom Long and Short strategies using technical indicators, logical conditions, and mathematical comparisons. These strategies are essential for the bot to make buy (Long) and sell (Short) decisions based on market trends.

This guide will cover:

  • All supported indicators in BATT Bot.
  • How to write Long and Short strategies correctly.
  • How to combine multiple conditions using logical operators AND and OR.
  • A guide to generate strategies based on market conditions using AI prompts.

Step 1: Access the Trading Strategy Fields

  1. Open the BATT Bot.
  2. Click the Settings button in the top-right corner.
  3. Locate the two fields:
    • Long Strategy: Conditions for opening a buy (Long) position.
    • Short Strategy: Conditions for opening a sell (Short) position.

Step 2: Understanding Supported Indicators

BATT Bot allows users to build strategies using technical indicators. Below is a complete list of all supported indicators:

1. Moving Averages

Moving averages help smooth out price action and identify trends.

  • SMA (Simple Moving Average):

    • sma_short, sma_long
    • Example: sma_short > sma_long → Indicates a bullish trend.
  • EMA (Exponential Moving Average):

    • ema_short, ema_long
    • Example: ema_short > ema_long → Confirms an uptrend.

2. Relative Strength Index (RSI)

Measures momentum and overbought/oversold conditions.

  • rsi
  • Example: rsi > 50 → Indicates buying momentum.

3. MACD (Moving Average Convergence Divergence)

Used to identify changes in trend strength.

  • macd_line, signal_line, macd_histogram
  • Example: macd_line > signal_line → Suggests bullish momentum.

4. Bollinger Bands

Used to measure market volatility.

  • upper_band, middle_band, lower_band
  • Example: price < lower_band → Suggests oversold conditions (potential buy signal).

5. Stochastic Oscillator (STOCH)

Determines momentum shifts.

  • stoch_k, stoch_d
  • Example: stoch_k > stoch_d → Indicates a bullish crossover.

6. Average Directional Index (ADX)

Measures the strength of a trend.

  • adx
  • Example: adx > 25 → Strong trend confirmation.

7. Average True Range (ATR)

Measures market volatility.

  • atr
  • Example: atr > 2 → High volatility detected.

8. On-Balance Volume (OBV)

Tracks cumulative buying/selling pressure.

  • obv
  • Example: obv > obv.shift(1) → Suggests increasing buying pressure.

9. Chaikin Money Flow (CMF)

Analyzes money flow into a security.

  • cmf
  • Example: cmf > 0 → Suggests buying pressure.

10. Fibonacci Retracement Levels

Used for predicting key support and resistance areas.

  • fib_23_6, fib_38_2, fib_50, fib_61_8
  • Example: price > fib_50 → Suggests bullish breakout.

Step 3: Writing a Long Strategy

A Long Strategy defines when the bot should enter a buy position.

Example of a Long Strategy

'sma_short > sma_long AND ema_short > ema_long AND rsi > 50 AND macd_line > signal_line'

Explanation

  • sma_short > sma_long: Short-term SMA is above long-term SMA (bullish trend).
  • ema_short > ema_long: EMA confirms the trend.
  • rsi > 50: RSI indicates buying momentum.
  • macd_line > signal_line: MACD confirms an uptrend.

More Complex Example

'price > lower_band AND stoch_k > stoch_d AND adx > 25 AND macd_histogram > 0'
  • The price is near lower Bollinger Band, indicating an oversold condition.
  • The Stochastic Oscillator confirms an upward crossover.
  • The ADX value > 25 confirms a strong trend.
  • The MACD histogram is positive, indicating increasing momentum.

Step 4: Writing a Short Strategy

A Short Strategy defines when the bot should enter a sell position.

Example of a Short Strategy

'sma_short < sma_long AND ema_short < ema_long AND rsi < 30 AND macd_line < signal_line'

Explanation

  • sma_short < sma_long: Short-term SMA is below long-term SMA (bearish trend).
  • ema_short < ema_long: EMA confirms the downtrend.
  • rsi < 30: RSI signals oversold conditions.
  • macd_line < signal_line: MACD confirms downward momentum.

More Complex Example

'price < upper_band AND stoch_k < stoch_d AND adx > 25 AND macd_histogram < 0'
  • The price is near upper Bollinger Band, indicating an overbought condition.
  • The Stochastic Oscillator confirms a downward crossover.
  • The ADX value > 25 confirms a strong trend.
  • The MACD histogram is negative, indicating decreasing momentum.

Step 5: Combining Multiple Conditions

To build more effective strategies, use logical operators: AND and OR.

AND Operator

  • Requires all conditions to be true for the strategy to be executed.
  • Example:
    'rsi > 50 AND sma_short > sma_long'

    (Triggers when both RSI is above 50 and SMA short is greater than SMA long.)

OR Operator

  • Requires at least one condition to be true for the strategy to be executed.
  • Example:
    'macd_line > signal_line OR rsi > 50'

    (Triggers when either MACD is bullish OR RSI is above 50.)

Multiple Conditions with AND/OR

You can mix AND and OR operators to create more complex strategies:

'rsi > 50' AND 'sma_short > sma_long OR macd_line > signal_line'
  • AND: Both RSI > 50 and one of the other conditions must be true.
  • OR: Either SMA short > SMA long or MACD line > signal line.

Step 6: Generating Strategies Using AI

Since markets are dynamic, strategies should be adjusted regularly. AI can help generate optimized strategies.

AI Prompt Template

Users can use AI tools (like ChatGPT, GPT-4, or TradingView Pine Script) to generate strategy conditions.

Example AI Prompt for Long Strategy

"Generate a Long trading strategy using RSI, MACD, and SMA indicators for a bullish trend. Format output as 'indicator1 > indicator2 AND indicator3 < value'."

Example AI Prompt for Short Strategy

"Generate a Short trading strategy using Bollinger Bands, ADX, and EMA for a bearish trend. Format output as 'indicator1 < indicator2 AND indicator3 > value'."

Why Use AI?

  • AI analyzes market trends faster.
  • Provides optimized indicator settings based on historical data.
  • Can automate strategy adjustments as market conditions change.

Step 7: Save and Apply the Strategy

Once you’ve written your strategy:

  1. Double-check syntax (ensure all conditions are properly formatted).
  2. Click Save Configuration to apply changes.
  3. Monitor bot performance to ensure it follows your defined strategy.

Final Thoughts

The BATT Bot supports a wide range of indicators and allows for highly customizable trading strategies. With the ability to define Long and Short strategies, use logical operators, and integrate AI for generating market-based strategies, traders can maximize profits and reduce risk.