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:
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.
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.
Logic
Define conditions that evaluate to true or false. Use IF nodes for expressions and AND nodes to combine multiple conditions.
SMA_Long > SMA_ShortExecution / Trade
Execute simulated buy or sell orders when upstream logic conditions are true. Specify position size as a percentage.
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ₙ) / nParameters
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 LossParameters
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 LineParameters
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 RangeParameters
length (default: 14) - Smoothing period
Output
Single value (price units): ATR_14
ATR_14 > 2 or combine with price: close < close[-1] - ATR_14Average 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 DXParameters
length (default: 14) - Smoothing period
Outputs
ADX_adx - Trend strength (0-100)ADX_plusDI - Bullish directionADX_minusDI - Bearish direction
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
| Operator | Description | Example |
|---|---|---|
| < | Less than | RSI_Fast < 30 |
| > | Greater than | RSI_Fast > 70 |
| <= | Less than or equal | close <= SMA_Long |
| >= | Greater than or equal | close >= SMA_Long |
| == | Equal to | RSI_Fast == 50 |
| != | Not equal to | volume != 0 |
Logical Operators
Combine multiple conditions. Both symbol and word formats are supported.
| Symbol | Word | Description |
|---|---|---|
| && | and | Both conditions must be true |
| || | or | At least one must be true |
| ! | not | Negates a condition |
Arithmetic Operators
+Add-Subtract*Multiply/Divide%Modulo^PowerTernary Operator
condition ? value_if_true : value_if_falseExample: RSI_Fast < 30 ? 1 : 0
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.
| Syntax | Description | Example |
|---|---|---|
| var[-1] | Previous bar's value | close[-1] |
| var[-5] | Value from 5 bars ago | RSI_Fast[-5] |
| var[-10] | Value from 10 bars ago | SMA_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 barsclose[-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:
openhighlowclosevolumeIndicator Variables
Indicator outputs use their title as the variable name. Connect them to logic nodes to use them in expressions.
Flow Order
Trade Execution
Execution nodes simulate trades when upstream logic evaluates to true. Position sizing is percentage-based.
Spends a percentage of available cash to buy the underlying asset at the current close price.
Sells a percentage of current holdings at the current close price, returning cash to the portfolio.
If a global trade fee is set (e.g., 0.1%), it is applied to both Buy and Sell orders.
Fee = Amount - Cost
Net = Revenue - (Revenue * FeeRate)
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.
SMA_Short > SMA_LongEntry: short MA above long MASMA_Short < SMA_LongExit: short MA below long MASMA_Short[-1] <= SMA_Long[-1] and SMA_Short > SMA_Long.RSI Mean Reversion
Buy weakness; sell strength. Best paired with a trend filter.
RSI_Fast < 30Entry: RSI oversoldRSI_Fast > 70Exit: RSI overboughtclose > SMA_Long for long-only strategies.Breakout + Volume Filter
Enter strength when price breaks up with confirming volume.
close > high[-1] && volume > 1000000Entry: close above yesterday's high with strong volumeclose < 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 rulesSecurity & 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