דלגו לתוכן
פתיחת RaamTrade

DonchianLowTrue — Donchian Low (True)

תוכן זה אינו זמין עדיין בשפה שלך.

The rolling minimum of the true lows over the window — the lower line of the textbook Donchian channel, and the classic trailing-stop line for a long breakout position. The seeded DonchianLow uses closes.

Signature

DonchianLowTrue(period, on=<source>)
Argument Type Required Notes
period int Param or literal Yes Channel lookback. Default 20, bounds 1–400.
on= symbol No Source symbol. Defaults to the trade symbol. Reads the low.

Formula

$$ \text{DL}t = \min(L{t-n+1} \ldots L_t) $$

Warmup

period bars. During the lead-in it returns the minimum of the bars seen so far, not a sentinel.

Reading the value

dl.value
dl.value_at(1)
self.trade.close <= dl.value_at(1)

Example

class ChannelExit(Strategy):
"""Trail a long position on the 10-bar low."""
entry = Param(20, min=1, max=400)
exit = Param(10, min=1, max=400)
trade = Symbol()
sizing = FixedCapital()
def execute(self):
dh = DonchianHighTrue(self.entry, on=self.trade)
dl = DonchianLowTrue(self.exit, on=self.trade)
if self.trade.close >= dh.value_at(1) and self.trade.is_flat:
self.buy(self.trade, reason="Channel breakout")
if self.trade.close <= dl.value_at(1) and self.trade.is_long:
self.sell(self.trade, self.trade.position, reason="10-bar low trail")

Notes

  • Richard Donchian’s channel, on true lows.
  • Proven by an assert-via-trade run on SPY daily (matched a strategy-side rolling min on every bar; zero alarm trades).
  • A shorter exit channel than entry channel (20 in / 10 out) is the classic Turtle asymmetry.