Flow Builder

The Flow Builder is the heart of Capandex. It provides a visual canvas where you create trading strategies by dragging nodes, connecting them with edges, and configuring parameters -- all without writing code.

Canvas Overview

The canvas is the main workspace of the Flow Builder. It is a zoomable, pannable area where you design your trading flows.

  • Node Sidebar - On the left side you will find a categorized list of all available nodes. Drag any node onto the canvas to add it to your flow.
  • Canvas Area - The center area where nodes are placed and connected. Use scroll to zoom and click-drag on empty space to pan.
  • Node Inspector - Click any node on the canvas to open its configuration panel on the right side. Here you can set parameters, view input/output ports, and see live values during execution.
  • Execution Panel - The bottom panel shows logs, trades, and performance metrics when a flow is running.
  • Toolbar - Top controls for undo, redo, zoom, fit view, and execution controls (Start, Stop, Backtest).

Node Types Overview

Nodes are the building blocks of a flow. Each node performs a specific function and has typed input and output ports. Nodes are organized into the following categories:

Triggers

4 nodes

Start your flow on a schedule, candle close, manual action, or webhook.

Exchange

3 nodes

Connect to exchanges, check account balances, and validate positions.

Market Data

2 nodes

Fetch price data, OHLCV candles, and order book depth.

Indicators

6 nodes

Technical indicators including SMA, EMA, RSI, MACD, Bollinger Bands, and ATR.

Logic

4 nodes

Compare values, check thresholds, and combine conditions with AND/OR gates.

Risk Management

4 nodes

Set stop losses, take profits, position sizing, and kill switches.

Sizing

1 node

Calculate position size based on risk percentage and account balance.

Execution

2 nodes

Place orders and close positions on connected exchanges.

Flow Control

2 nodes

Add delays and conditional branching to your flow logic.

Ops

2 nodes

Log data and send alerts via Telegram, Discord, or email.

See the Node Reference for complete details on every node, including all inputs, outputs, and parameters.

Connecting Nodes

Nodes communicate through typed connections called edges. Each node has output ports on its right side and input ports on its left side.

To create a connection:

  1. Hover over an output port (right side of a node) -- it will highlight
  2. Click and drag from the output port toward the target node
  3. Release on a compatible input port (left side of the target node)
  4. A colored edge will appear connecting the two ports, indicating data flow

Type safety: The builder enforces type compatibility. You can only connect outputs to inputs of compatible types. For example, a numeric output can connect to a numeric input, but not to a boolean input. Incompatible connections will be rejected with a visual indicator.

Removing connections: Click on an edge to select it, then press Delete or Backspace to remove it.

Flow Settings

Each flow has global settings that apply to the entire strategy. Access these by clicking the gear icon in the toolbar or opening the flow settings panel.

Exchange

Select the exchange this flow trades on. You must have an exchange connection configured in Settings, or use Paper Trading mode.

Symbol

The trading pair for this flow (e.g., BTC/USDT, ETH/USDT). The available symbols depend on the selected exchange.

Timeframe

The default candlestick timeframe used by trigger and data nodes (e.g., 1m, 5m, 15m, 1h, 4h, 1d). Individual nodes can override this setting.

Saving and Loading Flows

Flows are automatically saved as you work. Every change to nodes, connections, or settings is persisted to the server in real time.

  • Auto-save - Changes are saved automatically after each edit. A small indicator in the toolbar shows the save status.
  • Flow list - Return to the dashboard to see all your saved flows. Click any flow to open it in the builder.
  • Duplicate - Use the three-dot menu on any flow card to duplicate it. This creates a copy you can modify independently.
  • Delete - Flows can be deleted from the dashboard. This action is permanent and cannot be undone.

Next Steps