Formula Graph Is Live: Build Strategies From Formulas

Trigr's new formula graph lets strategy builders write entries, filters, regimes and exits as formulas across timeframes and markets. What it does, in 5 minutes.

Trigr Research4 min read
On this page
  1. What changed?
  2. What can a formula do?
  3. Where do formulas go?
  4. Is it safe from look-ahead?
  5. What does this unlock for strategy builders?
  6. Where can formula strategies run?
  7. How do you start?

TL;DR: Trigr strategies used to be built only from catalog nodes: pick an indicator, set a length, set a threshold. Now any condition can be a formula. Entries, filters, regimes and exits can read other timeframes (close@4h), other markets (asset("BTC").close), point-in-time data like funding (api("funding_rate")), and even signals you computed yourself (upload("my_signal")). Everything still backtests point in time, with no peeking at the future, and formula strategies run in Agents like any other. This post is the five-minute version; the full guide has every detail.

What changed?

A Trigr strategy is a graph: a trigger, filters, a signal that combines them, a risk block and an execution block. Until now every condition in that graph was one indicator from the catalog. Good for standard setups, limiting the moment an idea combined things.

The formula graph adds a node type, the Expression node, whose setting is a formula. Write the condition you actually have in mind and Trigr evaluates it on every bar:

rsi(close, 2) < 10 and close > sma(close, 200)
pct_change(close, 168) > pct_change(asset("BTC").close, 168)
zscore(close - sma(close, 50), 100) < -2

The first is a dip inside an uptrend, the second is "outperformed BTC over the last week", the third is "stretched two standard deviations below trend". Each used to need several nodes or was impossible. Now each is one line.

What can a formula do?

You want Write
A classic indicator ema(close, 50), rsi(close, 14), macd_hist(close, 12, 26, 9), atr(14), adx(14)
One you invented (close - lowest(low, 14)) / (highest(high, 14) - lowest(low, 14)) < 0.2
A higher timeframe close@4h > ema(close@4h, 50)
Another market asset("ETH").close / asset("BTC").close
Funding and other data api("funding_rate") < 0
A pattern or cooldown rolling_sum(close > open, 3) == 3
An event crosses_above(ema(close, 12), ema(close, 26))
Your own signal zscore(upload("my_signal"), 50) > 1

There are more than thirty functions: moving averages, RSI, MACD, Bollinger bands, ATR, ADX, lags, rolling windows, z-scores, ranks, crosses, bars_since and basic math. If the formula has a typo, Trigr refuses it before any credits are spent and points at the exact character.

Where do formulas go?

Four places, and you can mix them with normal indicator nodes:

  • Trigger: separate long and short conditions. A delivery setting chooses between firing on every bar the formula is true or only on the bar it turns true.
  • Filter: one condition for both sides, or one per side.
  • Regime: scale or block sizing when a condition holds.
  • Exits: exitLong / exitShort close the position when a formula turns true, for example "the 4h trend broke" or "RSI above 75".

One tip that will save you time: a crossover is true for one bar. If you use it as the entry, give the trade an explicit exit formula and turn off exit-on-flip, or the trade closes one bar later. With exit-on-flip off, leave onOpposite unset; to still reverse on the opposite cross, make exitLong the short entry condition and exitShort the long one. Trigr now warns you when a strategy is set up that way. Event vs state signals shows the numbers.

Is it safe from look-ahead?

Yes, by construction. Every function reads the current bar and earlier ones only. lag cannot go negative. A 4h or daily value only becomes visible once that bar has closed. A formula cannot read a timeframe finer than its own. Warm-up bars never trade, and missing data blocks a trade instead of guessing. We tested this the adversarial way, with daily and weekly signals that would show a huge fake edge if anything leaked; they show nothing, as they should.

Formulas also match the existing nodes: the formula close > ema(close, 50) and the EMA indicator node give identical backtests, trade for trade.

What does this unlock for strategy builders?

  • Way more ideas per hour. No more waiting for an indicator to be added to the catalog.
  • Cross-asset and multi-timeframe logic in one line instead of a chain of nodes.
  • Real exits. Leave when the trend breaks, not just at a fixed stop or target.
  • Easy ports from TradingView. Most of Pine Script's ta.* library maps one-to-one. See Pine Script to Trigr.
  • Your own research. Compute a signal in Python, upload it, and backtest it on Trigr's fills and costs. Here is how.

Need inspiration? 25 formula recipes covers trend, mean reversion, breakouts, volatility regimes, cross-asset and funding ideas, each checked on real data.

Where can formula strategies run?

Everywhere a normal strategy runs: backtests, the marketplace paper track once published, and Paper, Hyperliquid and Propr Agents. A few limits for now:

  • Uploaded signals are research only. Trigr cannot verify when your own data was knowable, so those strategies can be backtested but not published or deployed.
  • ML optimization and build-on-top do not take formula nodes yet.
  • Very long windows that need more history than live trading loads are refused when you create an Agent.
  • volume is refused on CFD-sourced markets such as SPX.

How do you start?

Open Studio, add an Expression node, and write your condition. Or connect Claude, ChatGPT, Claude Code or Codex through Trigr's MCP server and describe the strategy in plain English; the assistant writes the formulas, backtests them and iterates as labelled experiments on one strategy.

The fastest way to explore is to hand the whole thing to your AI and let it go wild: ask it to read the catalog, invent ten formula strategies on your favourite market, backtest each one as an experiment and tell you which ideas survive costs. This is a new feature, so if a formula behaves strangely, a validation message is unclear or a backtest looks off, tell us in Discord with the strategy link. Bug reports from builders are how this gets better fast.

Then do the boring part properly: backtest gross, backtest again with slippage and funding, read the trade log, and forward test on paper before any capital is involved. A formula makes a strategy easier to write. It does not make it more likely to work.

For the math behind the indicators, Wikipedia's pages on the relative strength index and Bollinger Bands are good references, and the strategy builder docs list every risk setting.

Backtests are not guarantees, and perps are leveraged instruments that can lose more than expected.

Frequently asked questions

What is the formula graph?

It is Trigr's Expression node: a strategy node whose setting is a formula instead of a single catalog indicator. You can use it as the entry trigger, as a filter, as a regime rule or as an exit, and mix it with regular indicator nodes in the same strategy.

Do I need to know how to code?

No. Formulas read like a spreadsheet: close > ema(close, 200) and rsi(close, 14) < 30. You can also ask an AI assistant connected to Trigr's MCP server to write and backtest them for you.

Can formula strategies run live?

Yes. They backtest, get a marketplace paper track when published, and run in Paper, Hyperliquid and Propr Agents. Strategies that read your own uploaded data are the exception: those are research only.

Is it free?

There is no separate plan or add-on for formulas. Backtests that use them cost credits like any other backtest.

Put the idea to an honest test.

Describe a strategy in plain English or from your own AI assistant, backtest it on point-in-time data, and forward-test it on paper before any real money is involved.