Strategy Builder (full guide)

Complete reference for building strategies in Bot Studio.

Introduction

Welcome to the Strategy Builder platform! This visual, graph-based system allows you to create sophisticated trading strategies without writing code. Build strategies by connecting nodes that represent data sources, indicators, logic conditions, and trading actions.

Key features

  • Visual Strategy Building: Drag-and-drop interface for creating trading strategies

  • Multi-Timeframe Support: Use multiple timeframes in a single strategy

  • Smart Money Concepts (SMC): Built-in SMC indicators including Order Blocks, Fair Value Gaps, BOS/CHOCH, and more

  • Technical Indicators: Traditional indicators like RSI, MACD, Bollinger Bands

  • Auto-Direction Detection: Automatically detects trading direction based on your strategy structure

  • Real-Time Backtesting: Test strategies with comprehensive performance metrics


Getting Started

Accessing the Strategy Builder

  1. Navigate to the Developer Hub in your dashboard

  2. Click on Bot Studio tab

  3. You'll see the visual strategy builder interface

Interface Overview

The Strategy Builder consists of:

  • Node Library Panel: Left sidebar with all available nodes organized by category

  • Canvas: Main workspace where you build your strategy graph

  • Properties Panel: Right sidebar for configuring selected nodes

  • Toolbar: Top bar with save, export, import, and run options


Core Concepts

Graph-Based Strategy Building

Strategies are built as directed graphs where:

  • Nodes represent components (data sources, indicators, conditions, actions)

  • Edges (connections) represent data flow from one component to another

  • Data flows from left to right through your strategy

Strategy Flow

A typical strategy follows this pattern:

Example Flow


Node Types

Data Sources

Market Data Node

Fetches real-time or historical market data.

Properties:

  • symbol: Trading pair (e.g., "EURUSD", "BTCUSD")

  • timeframe: Chart timeframe (e.g., "1H", "4H", "1D", "15T")

Example:

Resample Timeframe Node

Converts data from one timeframe to another (e.g., 1H to 4H).

Properties:

  • timeframe: Target timeframe to resample to

Usage: Connect Market Data → Resample Timeframe → Indicator


Technical Indicators

Retail Indicators

Traditional technical analysis indicators that work on price data.

Available Indicators:

  • RSI (Relative Strength Index)

    • period: Lookback period (default: 14)

  • MACD (Moving Average Convergence Divergence)

    • fast: Fast EMA period (default: 12)

    • slow: Slow EMA period (default: 26)

    • signal: Signal line period (default: 9)

  • Bollinger Bands

    • period: Moving average period (default: 20)

    • mult: Standard deviation multiplier (default: 2.0)

  • EMA (Exponential Moving Average)

    • period: EMA period (default: 21)

  • SMA (Simple Moving Average)

    • period: SMA period (default: 21)

Usage: Connect Market Data or Resample Timeframe → Indicator


Smart Money Concepts (SMC) Indicators

Advanced indicators based on institutional trading patterns.

Available SMC Indicators:

Order Blocks (OB)

Identifies institutional order blocks where large orders were placed.

Properties:

  • close_mitigation: Use close price for mitigation (default: false)

  • breaker: Enable breaker detection (default: false)

Output: Returns DataFrame with columns:

  • OB: 1 for bullish, -1 for bearish, NaN otherwise

  • Top: Upper boundary of order block

  • Bottom: Lower boundary of order block

Usage: Requires Market Data and Swing Highs/Lows as inputs

Fair Value Gaps (FVG)

Detects price inefficiency zones (gaps) in the market.

Properties:

  • join_consecutive: Merge consecutive FVGs (default: false)

Output: Returns DataFrame with columns:

  • FVG: 1 for bullish gap, -1 for bearish gap, NaN otherwise

  • Top: Upper boundary of FVG

  • Bottom: Lower boundary of FVG

Usage: Connect Market Data → FVG

Swing Highs/Lows

Identifies significant swing points in price action.

Properties:

  • swing_length: Number of bars to look back/forward (default: 50)

Output: Returns DataFrame with columns:

  • HighLow: 1 for swing high, -1 for swing low, NaN otherwise

  • Level: Price level of the swing point

Usage: Connect Market Data → Swing Highs/Lows

BOS/CHOCH (Break of Structure / Change of Character)

Detects structural breaks in market trend.

Properties:

  • close_break: Use close price for break detection (default: true)

Output: Returns DataFrame with columns:

  • BOS: 1 for bullish BOS, -1 for bearish BOS

  • CHOCH: 1 for bullish CHOCH, -1 for bearish CHOCH

  • Level: Breakout level

Usage: Requires Market Data and Swing Highs/Lows as inputs

Liquidity

Identifies liquidity zones (support/resistance levels).

Properties:

  • range_percent: Percentage range for liquidity detection (default: 0.01)

Usage: Requires Market Data and Swing Highs/Lows as inputs


Logic & Conditions

Compare Node

Compares a value against a threshold.

Properties:

  • op: Comparison operator (>, <, >=, <=, ==, !=)

  • value: Threshold value to compare against

Example:

Usage: Connect Indicator → Compare → Logic Gate or Order

Logic Gates

Combine multiple conditions:

  • AND Gate: All inputs must be true

  • OR Gate: At least one input must be true

  • NOT Gate: Inverts the input condition

Usage: Connect multiple Compare nodes → Logic Gate → Order

Crosses Above / Crosses Below

Detects when one value crosses above or below another.

Usage: Connect two indicators → Crosses Above/Below → Order


Trading Actions

Buy Order

Generates buy signals when conditions are met.

Properties: None (triggered by connected conditions)

Usage: Connect condition or logic gate → Buy Order

Sell Order

Generates sell signals when conditions are met.

Properties: None (triggered by connected conditions)

Usage: Connect condition or logic gate → Sell Order

Note: The platform automatically detects trading direction:

  • Only Buy Order → Long Only

  • Only Sell Order → Short Only

  • Both Buy and Sell Orders → Long & Short


Building Your First Strategy

1

Add Market Data

  • Drag the Market Data node from the Data Sources category

  • Configure properties:

    • Set symbol to your trading pair (e.g., "EURUSD")

    • Set timeframe to your desired chart timeframe (e.g., "1H")

2

Add an Indicator

  • Drag an indicator node (e.g., RSI) from Technical Indicators

  • Connect Market Data output → RSI input

  • Configure indicator properties (e.g., RSI period: 14)

3

Create Conditions

  • Drag Compare node from Logic & Conditions

  • Connect RSI output → Compare input

  • Configure:

    • Operator: < (less than)

    • Value: 30 (oversold level)

4

Add Trading Action

  • Drag Buy Order from Trading Actions

  • Connect Compare output → Buy Order input

5

Save and Test

  • Click Save to save your strategy

  • Click Run Backtest to test it

  • Review results in the Results page


Trading Direction

Auto-Detection

The platform automatically detects your trading direction based on the order nodes in your strategy:

  • Long Only: Strategy contains only buy_order nodes

  • Short Only: Strategy contains only sell_order nodes

  • Long & Short: Strategy contains both buy_order and sell_order nodes

Manual Override

You can manually set the trading direction in the Backtest Configuration panel:

  1. Navigate to Backtesting tab

  2. Expand Configuration

  3. Select Trading Direction:

    • Long Only

    • Short Only

    • Long & Short

Note: Manual selection overrides auto-detection.


Strategy Examples

Example 1: Simple RSI Strategy

A basic RSI mean reversion strategy that buys when RSI is oversold and sells when overbought.

Strategy Structure

Node Configuration

  • Market Data

    • Symbol: EURUSD

    • Timeframe: 1H

  • RSI Indicator

    • Period: 14

  • Compare Nodes

    • Compare 1: Operator <, Value 30 (oversold)

    • Compare 2: Operator >, Value 70 (overbought)

  • Order Nodes

    • Buy Order (connected to RSI < 30)

    • Sell Order (connected to RSI > 70)

Expected Behavior

  • Buy Signal: When RSI drops below 30 (oversold condition)

  • Sell Signal: When RSI rises above 70 (overbought condition)

  • Direction: Auto-detected as "Long & Short"


Example 2: SMC Order Block Strategy

A Smart Money Concepts strategy using Order Blocks and Fair Value Gaps.

Strategy Structure

Node Configuration

  • Market Data

    • Symbol: EURUSD

    • Timeframe: 1H

  • Swing Highs/Lows

    • Swing Length: 50

  • Order Blocks

    • Close Mitigation: false

    • Breaker: false

    • Inputs: Market Data + Swing Highs/Lows

  • Fair Value Gaps

    • Join Consecutive: false

    • Input: Market Data

  • Compare Nodes

    • Bullish OB: Operator ==, Value 1

    • Bullish FVG: Operator ==, Value 1

  • AND Gate

    • Combines bullish OB and FVG conditions

  • Buy Order

    • Triggered when both bullish OB and FVG are present

Expected Behavior

  • Buy Signal: When both a bullish Order Block and bullish Fair Value Gap are detected simultaneously

  • Direction: Auto-detected as "Long Only"


Example 3: Multi-Timeframe Strategy

A strategy using multiple timeframes for confirmation.

Strategy Structure

Node Configuration

  • Market Data (Base)

    • Symbol: EURUSD

    • Timeframe: 1H

  • Resample Timeframe

    • Timeframe: 4H

    • Input: Market Data

  • RSI Indicators

    • RSI 1H: Period 14

    • RSI 4H: Period 14

  • Compare Nodes

    • Compare 1H: RSI < 30

    • Compare 4H: RSI < 30

  • AND Gate

    • Requires both 1H and 4H RSI to be oversold

  • Buy Order

    • Only triggers when both timeframes confirm

Expected Behavior

  • Buy Signal: When RSI is oversold on both 1H and 4H timeframes

  • Direction: Auto-detected as "Long Only"


Backtesting

1

Running a Backtest

  • Build your strategy in Bot Studio

  • Navigate to Backtesting tab

  • Configure backtest parameters:

    • Symbol: Trading pair (auto-filled from strategy)

    • Timeframe: Base timeframe (auto-filled from strategy)

    • Date Range: Select specific dates or use period (e.g., "2y")

    • Trading Direction: Auto-detected or manually set

  • Click Run Backtest

2

Backtest Configuration

Date Selection

  • Period: Use relative periods like "2y", "1M", "30d"

  • Date Range: Specify exact start and end dates

Trading Direction

  • Auto-Detected: Based on buy/sell order nodes

  • Manual: Override in configuration panel

Advanced Options

  • Initial Capital: Starting capital (default: $10,000)

  • Leverage: Trading leverage (1:1 to 1:200)

  • Pyramiding: Number of position entries (default: 1)

3

Understanding Results

After backtesting, you'll see:

  • Performance Metrics: Total return, Sharpe ratio, max drawdown, win rate

  • Trade Statistics: Total trades, profit factor, average trade return

  • Equity Curve: Visual chart of portfolio value over time

  • Trade List: Detailed list of all executed trades

4

Optimization Mode

Enable Hyper Optimization to automatically find optimal parameters:

  • Toggle "Hyper Optimization" in configuration

  • Select optimization metric (Sharpe, Total Return, Profit Factor, etc.)

  • Set number of trials (10-500)

  • Enable parallel execution for faster optimization


Best Practices

Strategy Design

  1. Start Simple: Begin with basic strategies and add complexity gradually

  2. Use Multiple Timeframes: Confirm signals across different timeframes for better accuracy

  3. Combine Indicators: Use multiple indicators to confirm signals

  4. Test Thoroughly: Always backtest strategies before deploying

Node Connections

  1. Data Flow: Always connect nodes in logical order (Data → Indicator → Condition → Action)

  2. Required Inputs: Some nodes require specific inputs (e.g., Order Blocks need Swing Highs/Lows)

  3. Multiple Outputs: Some indicators output DataFrames; use Compare nodes to extract specific values

SMC Strategies

  1. Order Blocks: Always connect Swing Highs/Lows before Order Blocks

  2. Fair Value Gaps: Can be used standalone or combined with Order Blocks

  3. BOS/CHOCH: Requires Swing Highs/Lows as input

  4. Combining Signals: Use AND/OR gates to combine multiple SMC signals

Performance Tips

  1. Limit Timeframes: Using too many timeframes can slow down backtesting

  2. Optimize Parameters: Use optimization mode to find best indicator settings

  3. Filter Signals: Add additional conditions to reduce false signals


Troubleshooting

Common Issues

Strategy Validation Errors

Problem: "Strategy validation failed"

Solutions:

  • Ensure all nodes are properly connected

  • Check that Market Data node is present

  • Verify at least one Buy Order or Sell Order node exists

  • Ensure conditions are connected to order nodes

No Signals Generated

Problem: Backtest completes but no trades executed

Solutions:

  • Check that conditions are correctly configured

  • Verify indicator values are within expected ranges

  • Ensure Compare operators and values are appropriate

  • Test with less restrictive conditions

Direction Detection Issues

Problem: Wrong trading direction detected

Solutions:

  • Check that order nodes are properly connected

  • Verify you have the correct order types (buy_order vs sell_order)

  • Manually override direction in backtest configuration if needed

SMC Indicator Errors

Problem: SMC indicators not working

Solutions:

  • Ensure required inputs are connected (e.g., Swing Highs/Lows for Order Blocks)

  • Check that Market Data is connected to SMC indicators

  • Verify SMC indicators receive OHLC data (not just close price)

1

Getting Help

  • Check the error message in the Execution Engine

2
  • Verify all node connections are valid

3
  • Review the Strategy Analysis panel for detected components

4
  • Test with simpler strategies to isolate the issue


Advanced Topics

Multi-Timeframe Strategies

Strategies can use multiple timeframes simultaneously:

  1. Add Market Data node for base timeframe

  2. Add Resample Timeframe nodes for additional timeframes

  3. Connect indicators to respective timeframes

  4. Combine signals using logic gates

Example: Use 4H trend with 1H entries

Combining SMC and Traditional Indicators

Mix Smart Money Concepts with traditional indicators:

  1. Use SMC indicators for structure (Order Blocks, FVG)

  2. Use traditional indicators for confirmation (RSI, MACD)

  3. Combine with AND/OR gates

Example: Order Block + RSI confirmation

Signal Filtering

Add additional conditions to filter signals:

  1. Use multiple Compare nodes

  2. Combine with AND gates for strict filtering

  3. Use OR gates for flexible conditions

Example: RSI oversold AND price above moving average


Exporting and Sharing Strategies

Export Strategy

  1. Click Export button in toolbar

  2. Choose format:

    • JSON: Full strategy definition

    • Python: Generated Python code (read-only)

Import Strategy

  1. Click Import button

  2. Select JSON file

  3. Strategy will load onto canvas

Strategy Files

Strategy JSON files contain:

  • Node definitions with positions and properties

  • Edge connections between nodes

  • Metadata (name, description, version)


Conclusion

You now have the knowledge to build sophisticated trading strategies using the visual Strategy Builder. Remember to:

  • Start simple and iterate

  • Test thoroughly with backtesting

  • Use multiple timeframes and indicators for confirmation

  • Leverage both SMC and traditional indicators

  • Always validate your strategy before deploying

Happy strategy building!

Last updated