Documentation for Deptle Terminal.

Guides for setup, scripting, troubleshooting, and more.

Declaring an indicator

Declare an indicator as a class field, then update it inside on_tick.

  • Four indicators are built in: RollingMean and RSI for whole numbers; RollingMeanF32 and RSIF32 for decimals.
  • Write sma = RollingMean(window=20) with a fixed whole number, or window=fast with the name of an int Parameter whose min, default, and max are all above 0.
  • Two other spellings compile: the annotated form sma: RollingMean = RollingMean(window=...) and the legacy sma: RollingMean = State(window=...).
indicators.py
1class Cross(Strategy):
2 w: int = Parameter(default=20, min=2, max=200) # tunable window
3 sma = RollingMean(window=w) # window from the parameter
4 rsi = RSI(window=14) # or a fixed window
5
6 def on_tick(self, tick):
7 m = self.sma.update(tick.price) # feed the price, read the average
8 r = self.rsi.update(tick.price) # feed the price, read RSI (0..100)
9 if tick.price > m and r < 30: # above the average and oversold
10 return Order.Buy(quantity=1)
11 return Order.Hold()

Updating each tick

Call self.<name>.update(value) for the indicator's next value.

  • Whole-number indicators (RollingMean, RSI) take whole-number input.
  • Decimal indicators (RollingMeanF32, RSIF32) take decimals; other numbers convert in.
  • Calling .update(...) on something that is not an indicator is a compile error.

How they behave at runtime

Indicators keep their state between updates.

  • RSI and RSIF32 return a neutral 50 until they have seen a full window, and when there is no downward movement to divide by.
  • RollingMean and RollingMeanF32 average whatever they have so far during warmup.
  • Window values are clamped into valid bounds at runtime.

A fixed window creates a hidden, non-tunable parameter named deptle_dsl_window_0, deptle_dsl_window_1, ... (numbered in declaration order) that appears in the compiled parameter list; the deptle_dsl_window_ prefix is reserved.

Need help?

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

Check service status