Home/Dovee

Dovee

Dovee is an English strategy language — not Pine. Write when-rules, plots, risk, and session filters; Run them on the chart.

Open the chart, then Dovee (Ctrl+E). Write English rules, press Run, and plots appear on the candles. This terminal does not place orders — optionally POST values to your own webhook.

This page is the language tour. Every word and indicator — signature, parameters, return value, example — is in the function reference.

What a trader can write

strategy "EMA Cross"
long only
session 9:15 to 15:15

fastLen = input 9 as "Fast EMA"
fast = ema(close, fastLen)
slow = ema(close, 21)

plot fast as "Fast" blue
plot slow as "Slow" orange
fill fast, slow blue

when fast crosses above slow and bullish
  buy
  arrow up "Buy"
  label "Buy"
  paint green
when fast crosses below slow
  exit
  arrow down "Exit"
  alert "Trend flipped"

stop 10 points
targets 20, 40 split 50, 50

Entries

  • buy / sell / exit — long, short, flatten (exit only while in a trade)
  • long only / short only — opposite side becomes an exit
  • One trade at a time by default — no second entry while already in a trade. Write re-entry to allow same-side adds.
  • session 9:15 to 15:15 — signals only in that clock window

Chart

  • Lines: plot fast as "Fast" blue
  • Band: fill fast, slow green
  • Level: level 70 as "Overbought" red
  • Marks: arrow up "Buy", label "Buy"
  • Tint: paint green inside when
  • RSI-style pane: put oscillator at the top

Conditions

  • crosses above / crosses below
  • is above / is below
  • close 1 bars ago previous bar (shorthand: close[1]); close rising
  • Candles: bullish, bearish, doji, hammer, engulfing, shootingstar, insidebar, pinbar
  • Clock: mondaysunday, hour, minute (chart timezone)
  • else after a when
  • alert "message" — notify without an extra order
  • Symbols work too: rsi(14) > 70, + - * /

Language basics

  • Comments: # or //
  • when is the usual word for a rule (if still works); plot is the usual word for a line (show still works); bodies can use indent, then, or { }
  • Math: round floor ceil sqrt log pow sign abs
  • Price also has time (bar unix seconds), hour, minute. Evaluation is on each closed candle, not ticks.
  • Also: change, replaceMissing (shorthand nz), barssince. na means not available — not enough bars yet (for example ema(50) on the first 49 bars).
  • Colors: green red blue orange purple gray grey white black yellow lime
  • Debug without trading: note "fast=" + fast (or debug)

Indicators

English names, not Pine ta.*. Same set as the chart library — HMA, Keltner, Donchian, Williams %R, AO, Ichimoku lines, and the rest. ema(9) means close. Supertrend is supertrend(10, 3) (ATR length, then factor). Multi-line tools: keltnerupper, macdsignal, tenkan. Full list with arguments: Dovee reference.

Knobs for the UI: fastLen = input 9 as "Fast EMA". The old word ask still runs (you will see a deprecation warning). If the script has stop, target, or trail, those show as knobs too (Stop Loss, Target, Trail).

Multi-timeframe & levels

  • Higher timeframe: trend = ema(close, 50) on 1h — uses the last closed HTF bar only (no look-ahead)
  • Prior periods: previous day high, previous week low, previous month close
  • Developing: today high, week high, month low
  • Session levels: session high (needs session 9:15 to 15:30)
  • Named range: openingRange = range 9:15 to 9:30 then openingRange high
  • Reusable helper: function bullishTrend() return ema(close, 20) > ema(close, 50)
  • Timezone: timezone "Asia/Kolkata" for session and previous-day levels (Run defaults to Asia/Kolkata when unset)
  • Trail on chart: trail 5 points draws a trailing stop line for open simulated trades

Strategy state (simulated)

Dovee tracks analytical position state for rules and webhooks. This is not a live broker account.

  • flat / long / short / in position
  • entry price, bars since entry, profit percent, trade count
  • Partial exit: exit 50 percent

Risk

  • stop 10 points, stop 2 percent, or stop 2 atr (2 × ATR of 14)
  • Dynamic: stop at entry price - atr(14) * 2, target at entry price + atr(14) * 3
  • target 20 points or target 20, 30, 40 points (up to 3 levels) or trail 5 points / trail 1 atr
  • Multi-target with qty split: targets 100, 200, 300 split 50, 30, 20
  • Analysis controls: initial capital 100000, commission 0.03 percent, max trades 3, cooldown 15 minutes

charting.in does not place orders. qty and stop/target values are forwarded on Run if you save a webhook — your own bridge decides size and execution. Webhook payloads include a compatible v1 shape; when strategy extras are available they are also sent under version: 2 fields without removing the old keys.

Canonical words

Prefer when (alias if), plot (alias show), exit (alias close as an action), input (deprecated alias ask). Old aliases still run.

Start with these 10

The reference lists every indicator. New traders can begin here:

  • emaFollow the trend; fast vs slow EMA crossovers.
  • smaA slower trend line — support and resistance.
  • rsiSpot overbought / oversold turns.
  • macdlineMomentum and trend change.
  • supertrendStay with the trend; trail with ATR.
  • atrMeasure volatility; size stops as stop 2 atr.
  • bbupperUpper Bollinger — stretch and mean reversion.
  • bblowerLower Bollinger — stretch and mean reversion.
  • vwapIntraday fair value vs the session average.
  • adxTrend strength (not direction). High ADX = a real trend.

Next: Function reference