Invalid Formula Reference
A formula references a name that is not available: either signal. for a missing payload field, or rounding. for an unsupported rounding mode. See invalid-formula-reference in the reference manual.
A formula references a name that cannot be resolved when the expression runs. This usually means one of the following:
Missing payload field (signal.<key>)
- The name is misspelled or uses the wrong casing (JSON keys are case-sensitive).
- The field is missing from the webhook JSON (for example you reference
signal.entryPricebut only sentclosePrice). - You used a bare identifier (for example
closePrice) instead of the requiredsignal.<field>form. - A nested path is wrong (for example
signal.extras.atrwhen the payload key isATR).
Formulas can read top-level keys and nested object properties from the same webhook payload — for example signal.limitPrice, signal.extras.ATR, or signal.extras["ATR"]. JSON arrays remain arrays (for example min(signal.values)). If a nested key is missing, the formula fails with this error and the message includes the nested path (for example extras.doesNotExist).
Unknown rounding mode (rounding.<mode>)
The third argument to round() may use the built-in rounding context, for example rounding.halfEven. Property names are camelCase. Legacy PHP constant-style names (for example rounding.HALF_EVEN) are not supported.
Supported names:
rounding.halfAwayFromZero,rounding.halfTowardsZero,rounding.halfEven,rounding.halfOddrounding.towardsZero,rounding.awayFromZero,rounding.negativeInfinity,rounding.positiveInfinity
You may also pass an integer from 1 to 8 as the third argument to round().
Typical error details (webhook log)
The formula in field
limitPricereferencesentryPrice, which is not present in the payload.
The formula in field
xreferences rounding.unknownMode, which is not a supported rounding mode.
(The field name and the missing identifier are filled in for your request.)
Incorrect (missing payload key)
{
"ticker": "SPY",
"action": "buy",
"closePrice": "450.25",
"limitPrice": "=signal.entryPrice + 0.5"
}
entryPrice was never sent, so the reference cannot resolve.
Incorrect (missing signal. prefix)
{
"ticker": "SPY",
"action": "buy",
"closePrice": "450.25",
"limitPrice": "=closePrice + 0.5"
}
Use signal.closePrice so the expression reads from the payload context.
Incorrect (unknown rounding mode)
{
"ticker": "SPY",
"action": "buy",
"x": "=round(2.5, 0, rounding.HALF_EVEN)"
}
Use rounding.halfEven instead.
Correct
{
"ticker": "SPY",
"action": "buy",
"closePrice": "450.25",
"limitPrice": "=signal.closePrice + 0.5"
}
Correct (nested object under extras)
{
"ticker": "SPY",
"action": "buy",
"quantity": "=signal.extras.riskBudget / signal.extras.ATR",
"extras": {
"ATR": 53,
"riskBudget": 150
}
}
Related errors
- Invalid formula dependency — the name you referenced is another field whose value starts with
=(chained formulas are not supported). Use a single formula or send a literal value for the intermediate field. - Invalid formula syntax — the expression could not be parsed at all; fix operators and parentheses first, then re-check field names.
- Invalid formula runtime — an integer outside 1–8 was passed as
round()'s third argument; use arounding.*name or a valid mode integer.
Ready to put Invalid Formula Reference to work?
Free 7-day trial
Set-up in 3 minutes
Paper account for testing
By continuing, you agree to the TradersPost Terms of Service and Privacy Policy. This site is protected by reCAPTCHA.