Auto TP Adjustment Based on Candle Data + Screener Pair Management

This n8n workflow lets your bot dynamically:

  • Add new trading pairs based on Gainium screener criteria
  • Auto-calculate TP (Take Profit) per deal based on recent candle data
  • Edit the TP for new or stale deals to improve exit logic

:hammer_and_wrench: How to use

  1. Create a multi-pair bot
  2. Set your default config (ASAP entry, default TP, etc.)
  3. Copy your Bot ID into the workflow
  4. Test the workflow manually or schedule it to run periodically

:mag: What it does

:red_circle: Screener-Based Pair Updates

  • Uses the Gainium screener API to find pairs that match your criteria (e.g., volume, volatility)
  • Aggregates results and replaces the bot’s current pair list via the change_bot_pairs endpoint

:brain: Deal Management

  • Pulls all open deals for the bot
  • Filters:
    • Deals that haven’t been modified yet
    • Deals that have been open for over 24h (optional re-evaluation)

:bar_chart: Candle Data Collection

For each filtered deal, it:

  • Fetches recent OHLCV candle data from Bybit (1D, 4H, 1H)
  • Sends it to an AI agent that:
    • Evaluates price action
    • Calculates an optimal TP
    • Returns structured output

:receipt: Edit Deal with New TP

  • Applies the new TP using update_dca_deal via Gainium API

:test_tube: Optional Wait Time

You can increase the wait time between adding pairs and fetching deals to give the bot more time to place orders before deals are processed.

Download workflow

Screener_Trading_Agent.json (20.7 KB)

6 Likes