Home/Dovee/Language Specification v1
Dovee Language Specification v1.0
The normative v1 contract for Dovee grammar, evaluation, fills, time, positions, targets, risk, and webhooks.
This is Dovee’s current behavioral contract. It records what the charting.in engine does today; it does not add syntax or promise future features. Existing scripts do not need a version declaration.
What the v1 contract covers
- Grammar
- English-like rules and series expressions; no general-purpose loops, classes, or recursive functions.
- Execution order
- Closed-bar evaluation, rule actions, simulator state, then position-dependent plots and outputs.
- Fill rules
- Entries fill at close by default. A host may select next-open fills. Protective conflicts use a deterministic OHLC tie-break.
- Time rules
- One resolved script timezone controls sessions, calendar levels, daily gates, calendar MTF buckets, and daily Sharpe aggregation.
- Position rules
- Simulated positions track quantity, average entry, scale-ins, partial exits, and per-exit ledger entries.
- Target rules
- Non-split target lists flatten on first touch. Split target weights use opening quantity; the final target closes the remainder.
- Risk rules
- Risk percent sizes the initial position from initial capital and a deterministic supported stop distance.
- Webhook contract
- Fields are symbol, action, qty. Stops and targets are sent as their own exit alert when they trigger. Field names remain stable.
- Edge cases
- The RFC defines warm-up NA, MTF closure, OHLC ambiguity, quantity fractions, and unsupported dynamic exits.
Normative source: DOVEE_LANGUAGE_SPEC_V1.md. Behavior changes require an explicit spec update and a matching executable regression case.