/Documentation

Building

Strategy Builder

Last updated April 20, 2026

The Strategy Builder is a full-screen visual workspace powered by Blockly. Blocks snap together like puzzle pieces to define your trading logic — entry conditions, exit conditions, indicator calculations, and position management — with no code required.

The Editor

The block workspace auto-saves to your browser as you work. When you're ready to apply changes to the live runner or run a backtest, click Compile. Compiling converts the current workspace into the JavaScript that the runner actually executes and saves it to your project.

The editor occupies the full screen when the Editor tab is active. The left side shows the toolbox (block library); the canvas is where you assemble your strategy.

  • Pan: Middle-click drag, or hold Space + left-drag.
  • Zoom in/out: Scroll wheel over the canvas, or use the zoom controls in the bottom-right corner.
  • Fit to screen: Double-click an empty area of the canvas to center and zoom to fit all blocks.
  • Delete a block: Select it and press Delete or Backspace, or drag it to the trash can icon.
  • Duplicate a block: Right-click → Duplicate, or select and use Ctrl/Cmd+C then Ctrl/Cmd+V.
  • Undo / Redo: Ctrl/Cmd+Z and Ctrl/Cmd+Shift+Z.

The toolbox has a Search bar at the top of the left panel. Type any keyword (e.g. rsi, cross, buy, regime) to filter blocks across all categories instantly. Search is the fastest way to find a specific block when you know its name.

The Blocks button in the editor toolbar opens and closes the toolbox panel. When you click a category inside the toolbox, a flyout of available blocks for that category slides out.

Toolbox Categories

Blocks are organized into categories. Each category has a distinct color to make visual identification quick on the canvas.

CategoryColorContents
TradingBUY, SELL, Take Profit, Stop Loss — the action blocks that place orders.
Market DataPrice (Close/Open/High/Low/HL2/OHLC4/Typical), Candle Pattern, Volume Spike, Price Change %.
Lookback / HistoryPrevious Value (PREV), Highest Close, Lowest Close, Highest High, Lowest Low over N bars.
Indicators → TrendSMA, EMA — moving average calculations.
Indicators → MomentumRSI — Relative Strength Index.
Indicators → VolatilityATR, Bollinger Bands (upper, middle, lower).
Indicators → MACDMACD Line, MACD Signal Line, MACD Histogram.
Indicators → VolumeVWAP — Volume Weighted Average Price.
Events → CrossCross Up, Cross Down — detects when one series crosses another.
Events → BreakoutBreakout Up, Breakout Down — price breaking above/below a level.
Filters → TrendPrice Above MA, Price Below MA, Trend Direction (Bullish / Bearish / Either).
Filters → RegimeVolatility Regime filter.
Strategy → StateIn Position (boolean), Bars Since Entry (number), Position Value (USD).
Strategy → ControlCooldown Bars — enforces minimum bar gap between entries.
Logicif/else, AND, OR, NOT, comparison operators, boolean values.
MathArithmetic operations, number input blocks.

Compile & Run

Compiling

Clicking Compile does two things: it converts your block workspace into executable JavaScript and saves that code to your project in the database. The compile step also extracts the timeframe manifest — a header comment in the generated code that tells the Runner which kline timeframes to preload for your strategy.

You must compile after every change you want to apply. The Runner and the Backtest engine always use the last compiled version. If you see stale behavior, check whether you forgot to compile.

Running & Pausing

Clicking Run sets your project status to live. The Runner daemon picks up live projects and executes them according to the configured interval (default: 5 minutes). For each tick, it fetches fresh kline data, runs the compiled strategy in a sandboxed VM (5-second timeout per symbol), processes orders via the configured broker (paper or live), and writes results to logs.

Clicking Pause sets the project to paused. The Runner skips it on the next tick. Open positions are not automatically closed when you pause. They remain open until your strategy's exit conditions fire after you resume, or until you manually close them.

⚠️
Execution timeout: Each strategy run has a 5-second timeout per symbol. If your compiled logic takes longer (e.g. deeply nested conditions, many indicators), the run fails with a timeout error visible in the Logs tab. Simplify the strategy if you encounter this.

Multi-Timeframe Strategies

Indicator blocks can reference different timeframes. For example, you might use an EMA(50) on the 1h timeframe for trend direction, while using an RSI(14) on the 15m timeframe for entry timing. The compiled code embeds a @norena-timeframes manifest listing every timeframe used.

The Runner reads this manifest to determine which kline data to preload before running the strategy. The Backtest engine reads the same manifest to know which timeframes to fetch from Binance.

The primary timeframe (the first listed in the manifest) determines the bar resolution for the backtest simulation — one iteration per primary-timeframe candle. Higher timeframe data is available for indicator calculations but does not drive the bar loop.

ℹ️
Live execution note: All indicator blocks in live mode read from the in-memory kline cache which is populated with 1m data by default. The timeframe used for live indicator calculations is embedded in the compiled code and determines which cached series is read.