Documentation for Deptle Terminal.

Guides for setup, scripting, troubleshooting, and more.

What on_tick returns

Return an Order.*(...) value from on_tick. Returning nothing holds.

  • Order.Hold() — do nothing this tick and keep any open position.
  • Order.Close() — flatten the current position at market.
  • Order.Buy(...) / Order.Sell(...) — place an order.
  • Order.Score(score) — emit a ranking score instead of trading (see below).

Buying and selling

Give a quantity and, optionally, a price limit.

  • The quantity comes first — positionally or as quantity=.
  • A whole number means whole units: quantity=1.
  • For a fractional size, use base(...), base_units(...), or as_base(...) — for example quantity=base(0.25).
  • limit_price= is optional. Build it with price(...). A literal float is accepted; wrap a computed decimal in price(...).
  • A limit_price of 0 or less means market.
  • reduce_only=True lets the order only shrink the position, never flip or grow it.
  • A quantity of 0 or less holds at runtime.
orders.py
1class Exec(Strategy):
2 cap: float = Parameter(default=42000.5) # fixed price ceiling
3
4 def on_tick(self, tick):
5 if tick.price < price(self.cap): # price is under our cap
6 return Order.Buy(base(0.05), limit_price=price(self.cap), reduce_only=False)
7 return Order.Hold()

Score orders

Order.Score ranks ideas instead of placing a trade directly.

  • Pass the score positionally (Order.Score(x)) or as score=x.
  • The score is a whole number — wrap a computed decimal in int(...).
Need help?

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

Check service status