/Documentation

Building

Blocks Reference

Last updated April 20, 2026

Complete reference for every block available in the Strategy Builder. Blocks are organized by category matching the toolbox layout.

Trading

Trading blocks execute orders against the active broker — simulated paper positions or real Binance MARKET orders in live mode. These are the only blocks that can cause capital to move.

Trading

BUY

Places a market buy order for a specified USD amount. In paper mode, the position is opened at the current mark price with no fee. In live mode, a real Binance MARKET order is placed.

USD AmountNumberDollar value of the order to place
A BUY while already in a position is silently ignored — the runner checks for an existing open position before executing.
Trading

SELL

Closes some or all of the current position. The percentage parameter controls what fraction of the held quantity is sold. Use 100% to close the entire position.

PercentageNumber (1–100)Percentage of current position to sell
A SELL with no open position is silently ignored.
Trading

Take Profit

Returns true when the current mark price has risen by at least the specified percentage above the open position's entry price. Typically wired into an If block connected to a SELL block.

Target %NumberProfit threshold as a percentage above entry price
This block only checks the condition. It does not automatically sell. You must connect it to a SELL block inside an If statement.
Trading

Stop Loss

Returns true when the current mark price has fallen by at least the specified percentage below the open position's entry price. Returns false when no position is open.

Loss %NumberLoss threshold as a percentage below entry price

Market Data

Market Data blocks return raw price and volume values from the current symbol's kline series. All blocks require a Timeframe parameter that determines which candle series is read.

Market Data

Price (Close / Open / High / Low)

Returns the latest value of the selected price source from the specified timeframe. The Close variant also supports an Override Source dropdown letting you choose HL2, HLC3, Typical Price, OHLC4, Open, High, or Low.

TimeframeDropdown1m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d
Market Data

Volume

Returns the latest volume bar value from the specified timeframe.

TimeframeDropdownCandle timeframe to read volume from
Market Data

Candle Pattern

Detects classic single- and two-bar candle patterns from OHLC data on the most recent completed candle. Returns a boolean.

PatternDropdownDoji, Bullish Engulfing, Bearish Engulfing, Hammer, Shooting Star
TimeframeDropdownCandle series to detect the pattern on
Pattern logic: Doji = body ≤ 10% of range. Hammer = small upper body, lower shadow ≥ 2× body. Shooting Star = small lower body, upper shadow ≥ 2× body. Engulfing = current bar body fully engulfs prior bar body.
Market Data

Volume Spike

Returns true if the current bar's volume exceeds a configurable multiple of its recent average volume. Useful for detecting unusual activity or breakout confirmation.

Average PeriodNumberLookback bars for the volume average (default: 20)
MultiplierNumberSpike threshold as a multiple of average (default: 2×)
TimeframeDropdownCandle series to check
Market Data

Price Change %

Returns the percentage price change over a specified number of bars. Positive values indicate a price increase; negative values a decrease. Useful for momentum filters.

BarsNumberNumber of bars to measure change over (default: 1)
TimeframeDropdownCandle series to measure

Lookback / History

Lookback blocks query historical values from price and indicator series. They let you compare current values against past values or find extremes over a specified window.

Lookback

PREV

Returns the value of any indicator or price series from N bars ago. The block stores a rolling history of the series value across ticks so it can look backwards. Each distinct PREV usage in a strategy has its own persistent buffer (up to 50 values).

SeriesNumber (slot)Any indicator or price block whose historical value you want
BarsNumberHow many bars back to look (default: 1 = previous bar)
Returns NaN if the buffer doesn't yet have enough history. Plan for warmup bars accordingly, especially for slow timeframes.
Lookback

Highest Close / Lowest Close

Returns the highest (or lowest) value of any price source over the last N bars, inclusive of the current bar. Supports all source types: Close, Open, High, Low, HL2, HLC3, OHLC4.

SourceDropdownPrice source to evaluate (default: Close)
LengthNumberLookback window in bars
TimeframeDropdownCandle series to search
Lookback

Highest High / Lowest Low

Returns the highest High (or lowest Low) candle wick over the last N bars. Unlike Highest/Lowest Close, these operate specifically on the High or Low series rather than a selectable source.

LengthNumberLookback window in bars
TimeframeDropdownCandle series to search

Indicators

Indicator blocks compute standard technical analysis values from price series. All indicators require a Timeframe and return a single number. Most also accept a Source parameter to run the calculation on a price series other than Close.

Trend Indicators

Indicators

SMA — Simple Moving Average

Arithmetic mean of the source series over the last length bars. Returns the most recent value in the SMA array.

LengthNumberLookback period (bars)
SourceDropdownClose, Open, High, Low, HL2, HLC3, OHLC4, Volume (default: Close)
TimeframeDropdownCandle series to compute on
Indicators

EMA — Exponential Moving Average

Exponentially weighted moving average. Gives more weight to recent bars compared to SMA. The standard multiplier is 2 ÷ (length + 1).

LengthNumberLookback period (bars)
SourceDropdownPrice source (default: Close)
TimeframeDropdownCandle series

Momentum Indicators

Momentum

RSI — Relative Strength Index

Oscillator measuring the speed and magnitude of recent price changes. Returns a value between 0 and 100. Traditionally, readings below 30 indicate oversold conditions; readings above 70 indicate overbought.

PeriodNumberLookback period (default: 14)
SourceDropdownPrice source (default: Close)
TimeframeDropdownCandle series
Smoothing method: Wilder's RMA (same as TradingView). Minimum bars required = 2 × period.

Volatility Indicators

Volatility

ATR — Average True Range

Measures market volatility as the average of True Range values over a period. True Range = max(High − Low, |High − Prev Close|, |Low − Prev Close|). Useful for setting dynamic stop distances.

LengthNumberSmoothing period (default: 14)
TimeframeDropdownCandle series (requires High, Low, Close)
Volatility

Bollinger Bands

Returns a three-value object with upper, middle, and lower band values. The middle band is an SMA; upper and lower are the SMA ± (std multiplier × standard deviation).

LengthNumberSMA period (default: 20)
Std Dev MultiplierNumberBand width multiplier (default: 2)
SourceDropdownPrice source (default: Close)
TimeframeDropdownCandle series

MACD

MACD

MACD

Moving Average Convergence/Divergence. Returns an object with macd (fast EMA − slow EMA),signal (EMA of MACD line), and histogram (MACD − signal). Wire the sub-fields to comparisons using the property accessor in Logic blocks.

FastNumberFast EMA period (default: 12)
SlowNumberSlow EMA period (default: 26)
SignalNumberSignal line period (default: 9)
SourceDropdownPrice source (default: Close)
TimeframeDropdownCandle series

Volume / Institutional

Volume

VWAP — Volume Weighted Average Price

Cumulative (price × volume) ÷ cumulative volume. The Session reset mode resets at midnight UTC on each new trading day — matching the VWAP shown on most exchanges and charting platforms. The None mode accumulates across all loaded candles.

ResetDropdownSession (default, resets daily at midnight UTC) or None
SourceDropdownPrice source (default: Typical Price / HLC3)
TimeframeDropdownCandle series

Events

Event blocks detect specific transitions or structural changes in price or indicator series. Unlike indicator blocks which return current values, event blocks return a boolean that fires exactly when the event occurs.

Cross Events

Events

Cross Up / Cross Down

Returns true on the exact bar where series A crosses above (or below) series B. Uses a persistent two-tick comparison: A must have been ≤ B on the prior bar and be > B on the current bar (strict cross). Ideal for EMA crossover signals.

ANumberThe crossing series (e.g. fast EMA)
BNumberThe reference series (e.g. slow EMA)
Cross events require two consecutive ticks to fire. The first tick after a strategy starts will always return false because no previous state exists yet.

Breakout Events

Events

Breakout Up / Breakout Down

Detects when price (or any source) closes above/below the highest/lowest value seen over a lookback window. Optionally, set a fixed Level instead of using the dynamic lookback high/low. The Confirm parameter requires N consecutive closing bars above/below the threshold before the event fires.

LookbackNumberBars to look back for the high/low threshold
LevelNumber (optional)Fixed price level; overrides dynamic lookback when set
ConfirmNumberConsecutive bars that must close through the level (default: 1)
SourceDropdownPrice source (default: Close)
TimeframeDropdownCandle series

Filters

Filter blocks return boolean values based on broader market conditions. They are designed to be used as gatekeeping conditions — restricting entries to favorable regimes or trend directions rather than generating signals themselves.

Trend Filters

Filters

Price Above / Below MA

Returns true if the current close price is above (or below) a configurable moving average. The MA type (SMA or EMA) and period are both configurable.

MA TypeDropdownSMA or EMA
PeriodNumberMoving average period
TimeframeDropdownCandle series
Filters

Trend Direction

Returns true based on an EMA crossover filter: uptrend (fast EMA > slow EMA) or downtrend (fast EMA < slow EMA). Useful for ensuring entries only happen in the direction of the prevailing trend.

DirectionDropdownUptrend or Downtrend
Fast EMANumberShort EMA period
Slow EMANumberLong EMA period
TimeframeDropdownCandle series

Regime Filters

Regime

Volatility Regime

New

Classifies the current market volatility regime as high or low by comparing the current ATR against a rolling SMA of ATR values. Returns true when the selected mode matches current conditions. Helps avoid entries during abnormally quiet or abnormally chaotic markets.

ModeDropdownHigh Volatility or Low Volatility
ATR LengthNumberATR calculation period (default: 14)
MultiplierNumberDeviation threshold from ATR average (default: 1.5)
TimeframeDropdownCandle series
High Volatility: current ATR > multiplier × ATR SMA. Low Volatility: current ATR < (1 / multiplier) × ATR SMA. Requires at least 2× ATR length bars of history.

Strategy

Strategy blocks expose information about the current state of the running strategy — whether a position is open, how long it has been held, and what its current value is.

State Blocks

Strategy

In Position

Returns true if there is currently an open position on the strategy's symbol. Essential for buy-only-when-flat and sell-only-when-long logic.

Strategy

Bars Since Entry

Returns the number of primary-timeframe bars that have elapsed since the current position was entered. Returns Infinity when no position is open, so comparisons likeBars Since Entry > 10 are safe with no position.

Strategy

Position Value

New

Returns the current notional USD value of the open position: quantity held × current mark price. Returns NaN when no position is open. Useful for size-based exit logic, e.g. "sell if position value exceeds $10,000."

Control Blocks

Strategy

Cooldown Bars

Returns true if at least N bars have elapsed since the last trade (or since entry, depending on the scope). Use this to prevent re-entry too soon after a trade completes.

BarsNumberMinimum bars required since the reference event
ScopeDropdownlast_trade (default) or entry

Logic & Math

Standard Blockly logic and math blocks. These are provided by the core Blockly library and behave identically to their standard definitions, but are integrated into Norena's condition tracking system so all comparisons appear in the Trade Detail log.

BlockCategoryDescription
If / else if / elseLogicConditional branching. Else branches are tracked correctly in Trade Detail logs.
Compare (=, ≠, <, ≤, >, ≥)LogicNumeric comparisons. Both sides and the result are logged in the condition table.
AND / ORLogicCompound boolean. Groups sub-conditions in the Trade Detail log with a group summary row.
NOTLogicBoolean negation. Flips the last condition row's result and rule in the log.
true / falseLogicBoolean literal.
NumberMathNumeric literal.
Arithmetic (+, −, ×, ÷, ^)MathStandard arithmetic operations.
Math functionsMathabs, sqrt, round, floor, ceil, sin, cos, tan, log, exp, and more.
VariablesVariablesSet and get named variables to store intermediate values across blocks.
Condition tracking in Logic blocks: Norena overrides the standard logic_compare,logic_operation, logic_negate, and controls_if generators so that every boolean comparison is automatically recorded in the Trade Detail log with its label, value, rule, and result. You don't need to add any special logging blocks — the system captures it automatically whenever you build an If/comparison structure.