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

FractalLow — Fractal Low

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

Williams’ five-bar fractal: a low with two higher lows on each side. Confirmed two bars late by construction.

Signature

FractalLow(window, on=<source>)
Argument Type Required Notes
window int Param Yes Pinned at 5. Bounds 5–5.
on= symbol No Source symbol. Defaults to the trade symbol. Reads the low.

Formula

The third bar of five is strictly lower than the two before and the two after.

Warmup

5 bars; 0 until then.

Reading the value

fl.value
fl > 0

The flag refers to the bar two bars ago.

Example

class FractalSupport(Strategy):
"""Buy a confirmed fractal low inside a longer uptrend."""
trade = Symbol()
sizing = FixedCapital()
def execute(self):
fl = FractalLow(5, on=self.trade)
sma = SMA(200, on=self.trade)
if fl.value > 0 and self.trade.close > sma.value and self.trade.is_flat:
self.buy(self.trade, reason="Fractal low in an uptrend")
if self.trade.close < sma.value and self.trade.is_long:
self.sell(self.trade, self.trade.position, reason="Trend lost")

Notes

  • Bill Williams, Trading Chaos (1995). Identical to PivotLow(5).
  • Proven by an assert-via-trade run on SPY daily (agreed with the independent pivot reference on every bar; zero alarm trades).