Skip to content
Open RaamTrade

ThreeBlackCrows — Three Black Crows

Three consecutive black bars, each opening inside the previous body and closing lower: a steady, broad decline. Returns −1.

Signature

ThreeBlackCrows(lookback, on=<source>)
Argument Type Required Notes
lookback int Param Yes Pinned at 1; three bars are kept in state. Bounds 1–1.
on= symbol No Source symbol. Defaults to the trade symbol. Reads open and close.

Formula

Three black bodies with falling opens and falling closes, each open inside the prior body.

Warmup

Three bars of state.

Reading the value

p.value
p < 0

Pattern indicators return a flag, not a level: +1 bullish, -1 bearish, 0 absent. They are zero on most bars by design, so treat them as event triggers rather than as something to smooth or cross.

Example

class CrowsExit(Strategy):
"""Act on the pattern only in the direction of the longer trend."""
trade = Symbol()
sizing = FixedCapital()
def execute(self):
p = ThreeBlackCrows(1, on=self.trade)
sma = SMA(50, on=self.trade)
if p.value == 0 and self.trade.close > sma.value and self.trade.is_flat:
self.buy(self.trade, reason="No distribution sequence")
if p.value < 0 and self.trade.is_long:
self.sell(self.trade, self.trade.position, reason="Three black crows")

Notes

  • The bearish mirror of ThreeWhiteSoldiers.