SE100
SE100
Docs
  • Docs
  • Changelog
  • Feature requests
  • Support portal
    • Widgets
    • Domain-Specific Language (DSL)
    • SEIOO DSL Semantics
    • SEIOO DSL: The Definitive Guide to Building High Performance Trading Logic
    • Signal Production 1.0
    • Signal Production 2.0
    • SEIOO - Use Cases
    • Conditional Masking, Regime Gates, and State Machines in SEIOO
    • SEIOO Auto Trade Flow

Conditional Masking, Regime Gates, and State Machines in SEIOO

Logical outputs in SEIOO are numeric series. That means they do more than decide yes or no.
Conditional Masking, Regime Gates, and State Machines in SEIOO

Conditional Masking, Regime Gates, and State Machines in SEIOO

Logical outputs in SEIOO are numeric series. That means they do more than decide yes or no. They can gate, mask, and control flow across entire signal stacks. This is where raw logic becomes system behavior.

Conditional masking

Use a logical condition to allow a signal to pass only when the condition is true. When false, the output is zero.

(X:BTCUSD.close > ema(X:BTCUSD.close, 50)) * logdiff(X:BTCUSD.close)
(X:BTCUSD.volume > ema(X:BTCUSD.volume, 20)) * abs(logdiff(X:BTCUSD.close))
(X:BTCUSD.rsi < 30) * (-logdiff(X:BTCUSD.close))

Regime gates

Define market states that enable or disable entire behaviors. Everything downstream is conditional on the regime.

//Define a trend regime
ema(X:BTCUSD.close, 20) > ema(X:BTCUSD.close, 100)
trend_regime * logdiff(X:BTCUSD.close)
trend_regime * ema(logdiff(X:BTCUSD.close), 10)

Volatility regimes

Separate high and low volatility behavior using return magnitude.

//Define a high volume state and use the Widget ID
abs(logdiff(X:BTCUSD.close)) > ema(abs(logdiff(X:BTCUSD.close)), 20)
high_vol * logdiff(X:BTCUSD.close)
(1 - high_vol) * ema(logdiff(X:BTCUSD.close), 15)

State machines

Encode mutually exclusive states. Only one behavior is active at a time.

//Define a "bull state"
ema(X:BTCUSD.close, 20) > ema(X:BTCUSD.close, 50)
//Define a "bear state"
ema(X:BTCUSD.close, 20) < ema(X:BTCUSD.close, 50)
//Combine with widget reference
(@widgetID.timeseries * logdiff(X:BTCUSD.close)) + (@widgetID.timeseries * (-logdiff(X:BTCUSD.close)))

What this unlocks

  • Behavior-aware signals Signals that change form depending on market state.

  • Regime-dependent strategies Different math for trend, range, compression, or expansion.

  • Implicit state machines Flow control without if-statements or branching.

  • Composable system design Logic outputs become first-class inputs to everything else.

This is the point where SEIOO stops being indicator math and becomes a control system over market behavior.

PrevSEIOO - Use Cases
NextSEIOO Auto Trade Flow
Was this helpful?