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.
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.
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.
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.
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.
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.
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.
Volume
Returns the latest volume bar value from the specified timeframe.
Candle Pattern
Detects classic single- and two-bar candle patterns from OHLC data on the most recent completed candle. Returns a boolean.
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.
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.
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.
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).
NaN if the buffer doesn't yet have enough history. Plan for warmup bars accordingly, especially for slow timeframes.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.
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.
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
SMA — Simple Moving Average
Arithmetic mean of the source series over the last length bars. Returns the most recent value in the SMA array.
EMA — Exponential Moving Average
Exponentially weighted moving average. Gives more weight to recent bars compared to SMA. The standard multiplier is 2 ÷ (length + 1).
Momentum Indicators
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.
Volatility Indicators
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.
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).
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.
Volume / Institutional
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.
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
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.
false because no previous state exists yet.Breakout 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.
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
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.
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.
Regime Filters
Volatility Regime
NewClassifies 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.
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
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.
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.
Position Value
NewReturns 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
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.
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.
| Block | Category | Description |
|---|---|---|
If / else if / else | Logic | Conditional branching. Else branches are tracked correctly in Trade Detail logs. |
Compare (=, ≠, <, ≤, >, ≥) | Logic | Numeric comparisons. Both sides and the result are logged in the condition table. |
AND / OR | Logic | Compound boolean. Groups sub-conditions in the Trade Detail log with a group summary row. |
NOT | Logic | Boolean negation. Flips the last condition row's result and rule in the log. |
true / false | Logic | Boolean literal. |
Number | Math | Numeric literal. |
Arithmetic (+, −, ×, ÷, ^) | Math | Standard arithmetic operations. |
Math functions | Math | abs, sqrt, round, floor, ceil, sin, cos, tan, log, exp, and more. |
Variables | Variables | Set and get named variables to store intermediate values across blocks. |
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.