Skip to main content
ArenaScript v1.2

Official Grammar For Builders And Agents

ArenaScript is the public contract language of Strategy Arena. It describes rules, params, hooks and validation boundaries. It is not private Python source code.

Status: working specification · Date: 2026-06-17
Generate strict script Use only official sections. No invented filters, no Python, no Pine.
Validate then repair External AIs must call validation and fix line-level errors before backtesting.
Expose params params: is the bridge to CUDA and future GPU contributors.
Export only after proof Arena Verified comes before TradingView distribution.

Minimal Valid Script

strategy "Example Strategy" version 1.2
asset: BTC
timeframe: 1h
capital: 10000

entry:
    condition: RSI(14) crosses above 30
    condition: price > EMA(50)
    size: 25%

exit:
    take_profit: 5%
    stop_loss: 3%
    timeout: 20 bars

Root Fields

strategy "Name" version 1.2 asset: BTC timeframe: 1h capital: 10000 tags: a, b public: true

Strict MCP asset examples

BTC, ETH, SOL, QQQ, SPY, GLD, SLV, USO, NASDAQ, SP500, GOLD, SILVER, OIL.

Official Sections Only

entry:exit:regime:regime_filter:invictus_protection:arena_context:ml:portfolio:custom:params:alert:
Complex systems do not invent new sections. Chimera, Leviathan, Hydra and Meta Intelligence attach through custom:, ml: or portfolio:.

Supported Conditions

Indicators

  • RSI(n) < value, RSI(n) > value
  • RSI(n) crosses above value
  • price > EMA(n), price < SMA(n)
  • EMA(a) crosses above EMA(b)
  • EMA(a) > EMA(b)
  • MACD > 0, MACD < 0
  • ADX(n) > value, ADX(n) < value

Context

  • volume > SMA(volume,n) * x
  • abs(price - price[1]) / price[1] * 100 > x
  • ATR(a) < ATR(b) * x
  • regime == BULL
  • regime == BEAR
  • regime == NEUTRAL

One condition per line

entry:
    condition: RSI(14) < 30
    condition: price > EMA(50)
    condition: ADX(14) > 18

Params For CUDA And GPU Clients

The params: section declares search ranges. CUDA can tune defaults, then return the same ArenaScript with better values.

params:
    adx_min: min=12 max=35 type=int default=18
    atr_stop: min=0.8 max=2.8 type=float default=1.5
    atr_take: min=1.1 max=4.0 type=float default=2.2
    veto_threshold: min=0.35 max=0.85 type=float default=0.62

ML, Portfolio And Custom Hooks

ml:
    enabled: true
    model: hydra_mtf_confluence
    threshold: 0.60
    features: m15, h1, h4, daily, regime

portfolio:
    enabled: true
    weights: BTC:0.24, QQQ:0.20, GLD:0.14
    rebalance: regime_change

custom:
    enabled: true
    hooks: chimera_pattern_check, regime_shift_kill

These are public contract hooks. The native implementation may remain server-side, ML-side or CUDA-side.

Agent Validation Loop

1. Call arenascript_reference.
2. Generate ArenaScript only.
3. Call validate_arenascript.
4. Repair until parsed cleanly.
5. Backtest with real arena assumptions.
6. Run Monte Carlo if the result deserves it.
7. Optimize active monster families with CUDA when applicable.
8. Inspect Pine capability.
9. Export to TradingView only after validation.

Forbidden Pseudo-Sections

chimera_filter: leviathan_filter: oracle_filter: cuda_monster: world_arena_monster:

Unsupported in v1.2

momentum(n), +DI(n), -DI(n), arbitrary Python, Pine Script, and natural-language conditions are not strict ArenaScript conditions.

TradingView
Validated idea? Open the charting layer.
Strategy Arena validates the strategy. TradingView is where builders inspect charts, Pine and alerts.
Official partner link. TradingView states referred users receive a $15 coupon toward their next plan.
Open TradingView