Backtester logo
Beta access onlyContact
BacktestersCodelessDocumentation

Codeless Backtester

Build and test trading strategies visually without writing code. Connect nodes to create logic flows, define entry and exit conditions, and simulate performance against historical data.

Overview

The codeless backtester allows you to simulate systematic trading strategies through a visual node-based interface. Each strategy is composed of interconnected nodes that define data inputs, indicators, logic conditions, and trade execution.

Daily Timeframe

Backtests iterate over daily price data. Each day, the full logic flow is evaluated and trades are executed if conditions are met.

Benchmark Comparison

Strategy performance is compared against a buy-and-hold benchmark of your choice, showing relative performance.

Pyramiding Allowed

Multiple positions can be opened if conditions remain true across consecutive days. Use percentage-based sizing to manage exposure.

Full Trade Log

Every trade is logged with entry/exit prices, dates, quantities, and profit/loss calculations for detailed analysis.

Quick Start

If you're new to the canvas, start by building one entry condition and one exit condition. Keep the first version readable, then iterate.

Strategy Skeleton

A minimal, easy-to-debug node flow:

Price (close)Indicator(s)IF EntryBUY
Indicator(s)IF ExitSELL

Entry

Example: SMA_Short > SMA_Long

Exit

Example: SMA_Short < SMA_Long

Checklist

  • Use clear indicator titles (they become variable names).
  • Connect every indicator you reference in an IF expression.
  • Start with 1-2 conditions; add filters later.
  • Use lookbacks for crossovers (e.g., yesterday vs today).

Node Types

Strategies are built from four types of nodes. Connect them together to create your trading logic flow.

Price / Data

Access price data for the current day in your backtest. Price variables are globally available without needing explicit connections.

openhighlowclosevolume

Indicator

Calculate technical indicators from price data. Each indicator uses its title as the output variable name (e.g., 'SMA_Long', 'RSI_Fast'), making expressions easier to understand.

SMA_LongSMA_ShortRSI_FastRSI_Slow

Logic

Define conditions that evaluate to true or false. Use IF nodes for expressions and AND nodes to combine multiple conditions.

truefalse
IFEvaluate expressions like SMA_Long > SMA_Short
ANDAll connected inputs must be true

Execution / Trade

Execute simulated buy or sell orders when upstream logic conditions are true. Specify position size as a percentage.

BuySell
BuyUse % of available cash to buy
SellSell % of current holdings

Indicators Reference

Detailed reference for all available technical indicators. Each indicator shows its calculation method, parameters, and output variables available for use in expressions.

Simple Moving Average (SMA)

The arithmetic mean of prices over a specified period. Smooths price data to identify trends.

Formula

SMA = (P₁ + P₂ + ... + Pₙ) / n

Parameters

length (default: 14) - Number of periods

Output

Single value: SMA_Long

Exponential Moving Average (EMA)

A weighted moving average that gives more importance to recent prices. More responsive to price changes than SMA.

Formula

EMA = Price × k + EMA_prev × (1 - k), where k = 2 / (n + 1)

Parameters

length (default: 14) - Number of periods

Output

Single value: EMA_Short

Relative Strength Index (RSI)

A momentum oscillator measuring speed and magnitude of price changes. Values range from 0-100; typically oversold below 30, overbought above 70.

Formula

RSI = 100 - (100 / (1 + RS)), where RS = Avg Gain / Avg Loss

Parameters

length (default: 14) - Lookback period

Output

Single value (0-100): RSI_Fast

MACD (Moving Average Convergence Divergence)

A trend-following momentum indicator showing the relationship between two EMAs. The histogram shows the difference between MACD and signal lines.

Formula

MACD Line = EMA(fast) - EMA(slow)
Signal Line = EMA(MACD, signal)
Histogram = MACD Line - Signal Line

Parameters

fast (default: 12) - Fast EMA periodslow (default: 26) - Slow EMA periodsignal (default: 9) - Signal EMA period

Outputs

MyMACD_macd - MACD lineMyMACD_signal - Signal lineMyMACD_histogram - Histogram

Bollinger Bands

Volatility bands placed above and below a moving average. Band width adjusts with volatility—wider during high volatility, narrower during calm periods.

Formula

Middle Band = SMA(n)
Upper Band = Middle + (StdDev × multiplier)
Lower Band = Middle - (StdDev × multiplier)

Parameters

length (default: 20) - SMA periodstdDev (default: 2) - StdDev multiplier

Outputs

BB_upper - Upper bandBB_middle - Middle band (SMA)BB_lower - Lower band

Stochastic Oscillator

A momentum indicator comparing closing price to price range over a period. %K is the fast line, %D is the smoothed signal line. Values range 0-100; oversold below 20, overbought above 80.

Formula

%K = ((Close - Lowest Low) / (Highest High - Lowest Low)) × 100
%D = SMA(%K, dPeriod)

Parameters

kPeriod (default: 14) - %K lookbackdPeriod (default: 3) - %D smoothing

Outputs

Stoch_k - %K fast lineStoch_d - %D signal line

Average True Range (ATR)

A volatility indicator measuring the average range of price movement. Useful for position sizing, stop-loss placement, and detecting volatility expansions/contractions.

Formula

True Range = max(High - Low, |High - Prev Close|, |Low - Prev Close|)
ATR = Wilder's smoothed average of True Range

Parameters

length (default: 14) - Smoothing period

Output

Single value (price units): ATR_14

ATR is in price units, not percentage. Use it with expressions like ATR_14 > 2 or combine with price: close < close[-1] - ATR_14

Average Directional Index (ADX)

Measures trend strength (not direction). ADX above 25 indicates a strong trend, below 20 suggests ranging market. +DI and -DI show bullish vs bearish momentum.

Formula

+DI = (Smoothed +DM / Smoothed TR) × 100
-DI = (Smoothed -DM / Smoothed TR) × 100
DX = |+DI - -DI| / (+DI + -DI) × 100
ADX = Smoothed average of DX

Parameters

length (default: 14) - Smoothing period

Outputs

ADX_adx - Trend strength (0-100)ADX_plusDI - Bullish directionADX_minusDI - Bearish direction

Common strategy: Buy when ADX_adx > 25 && ADX_plusDI > ADX_minusDI (strong uptrend). Use ADX rising to confirm trend is strengthening.

Expression Syntax

IF nodes accept expressions that evaluate to true or false. The parser supports mathematical and logical operations—arbitrary code execution is blocked for security.

Comparison Operators

OperatorDescriptionExample
<Less thanRSI_Fast < 30
>Greater thanRSI_Fast > 70
<=Less than or equalclose <= SMA_Long
>=Greater than or equalclose >= SMA_Long
==Equal toRSI_Fast == 50
!=Not equal tovolume != 0

Logical Operators

Combine multiple conditions. Both symbol and word formats are supported.

SymbolWordDescription
&&andBoth conditions must be true
||orAt least one must be true
!notNegates a condition

Arithmetic Operators

+Add
-Subtract
*Multiply
/Divide
%Modulo
^Power

Ternary Operator

condition ? value_if_true : value_if_false

Example: RSI_Fast < 30 ? 1 : 0

Case insensitive: Variable names are case-insensitive. You can use RSI_Fast, rsi_fast, or Rsi_Fast interchangeably.

Historical Lookback

Access previous values using the [-x] syntax, where x is the number of bars to look back.

SyntaxDescriptionExample
var[-1]Previous bar's valueclose[-1]
var[-5]Value from 5 bars agoRSI_Fast[-5]
var[-10]Value from 10 bars agoSMA_Long[-10]

Common use cases:

close > close[-1]Price is higher than yesterday (bullish momentum)
RSI_Fast[-1] < 30 && RSI_Fast >= 30RSI crossed above 30 (oversold exit signal)
close > SMA_Long && close[-5] < SMA_Long[-5]Price crossed above SMA within the last 5 bars
Insufficient history: If you reference a lookback that exceeds available data (e.g., close[-10] on the 5th bar), the logic node will be skipped and an error will be logged. The backtest will continue, but those early bars won't trigger trades.

Connections & Flow

Nodes must be connected to pass data through the strategy. The flow determines which variables are accessible in each logic expression.

Global Variables

Price data is always available without connections:

openhighlowclosevolume

Indicator Variables

Indicator outputs use their title as the variable name. Connect them to logic nodes to use them in expressions.

RSI_FastIF: RSI_Fast < 30
Missing connections: If you reference a variable that isn't connected, you'll see an error:
Missing input connection(s) for variable(s): RSI_Fast

Flow Order

Price DataIndicatorsLogic (IF/AND)Execution

Trade Execution

Execution nodes simulate trades when upstream logic evaluates to true. Position sizing is percentage-based.

BUY

Spends a percentage of available cash to buy the underlying asset at the current close price.

Example: With $1,000 cash and Buy 50%, you spend $500 to purchase shares.
SELL

Sells a percentage of current holdings at the current close price, returning cash to the portfolio.

Example: Holding 10 shares and Sell 100% sells all 10 shares.
Trade Fees

If a global trade fee is set (e.g., 0.1%), it is applied to both Buy and Sell orders.

Buy OrdersFee is deducted from the allocated cash amount.
Cost = Amount / (1 + FeeRate)
Fee = Amount - Cost
Sell OrdersFee is deducted from the gross revenue.
Revenue = Shares * Price
Net = Revenue - (Revenue * FeeRate)
Insufficient funds: Buy orders with no available cash or sell orders with no holdings will be skipped. Check the trade log for details.

Strategy Examples

Copy these into IF nodes and rename indicators to match your canvas. Each example includes a simple visual of the node flow.

Moving Average Crossover

Trend-following entry with a symmetric exit.

Close
SMA_ShortSMA_Long
IFBUY
SMA_Short > SMA_LongEntry: short MA above long MA
SMA_Short < SMA_LongExit: short MA below long MA
For cleaner signals, confirm the crossover using a lookback: SMA_Short[-1] <= SMA_Long[-1] and SMA_Short > SMA_Long.

RSI Mean Reversion

Buy weakness; sell strength. Best paired with a trend filter.

RSI_FastIFBUY/SELL
RSI_Fast < 30Entry: RSI oversold
RSI_Fast > 70Exit: RSI overbought
Add a trend filter by also requiring close > SMA_Long for long-only strategies.

Breakout + Volume Filter

Enter strength when price breaks up with confirming volume.

PriceVolumeIFBUY
close > high[-1] && volume > 1000000Entry: close above yesterday's high with strong volume
close < SMA_ShortExit: lose momentum (close falls below a short MA)

Expression Patterns

RSI_Fast[-1] < 30 && RSI_Fast >= 30Cross above threshold (oversold exit)
close > SMA_Long && close[-1] <= SMA_Long[-1]Price crossed above MA today
(RSI_Fast < 30 && close > SMA_Long) || (RSI_Fast < 25)Parentheses for readable combined rules

Security & Limitations

For security, the expression parser only allows mathematical and logical operations. The following are blocked:

  • Function calls like Math.max()
  • Variable assignments like x = 5
  • Loops and control flow
  • System access or external data
  • Referencing variables without connecting the node