Documentation for Deptle Terminal.

Guides for setup, scripting, troubleshooting, and more.

Declaring Indicators

Declare indicators at class scope, then update them inside on_tick.

  • RollingMean (i64), RSI (i64).
  • RollingMeanF32 / RollingMeanF (float).
  • RSIF32 / RSIF (float).
  • window must reference an existing parameter with min/default/max all > 0.
indicator_declare.py
1class IndicatorDecl(Strategy):
2 w: int = Parameter(default=20, min=2, max=200)
3 sma: RollingMean = State(window=w)
4 rsi: RSI = State(window=w)
5
6 def on_tick(self, tick):
7 m = self.sma.update(tick.price)
8 r = self.rsi.update(tick.price)
9 if tick.price > m and r < 30:
10 return Order.Buy(quantity=1)
11 return Order.Hold()

Update Rules

Call self.<indicator>.update(value) each time you want the next indicator value.

  • Integer indicators require i64 input.
  • Float indicators accept float and numeric values (valid numeric casts are inserted).
  • Calling .update(...) on non-indicator fields is a compile error.

Runtime Behavior

Indicators behave predictably and keep their state between updates.

  • Window/period values are clamped into valid bounds at runtime.
  • RSI returns neutral 50 during warmup and zero-denominator cases.
  • All indicator state persists in strategy state memory between ticks.
Need help?

If launch fails, include your loader version, OS, and latest crash log so support can reproduce the issue quickly.

Check service status