Skip to content
Open RaamTrade

ShootingStar — Shooting Star

A small body at the bottom of the range with a long upper shadow, after an advance: buyers pushed price up and gave all of it back. Returns −1.

Signature

ShootingStar(trend_period, body_ratio, shadow_ratio, on=<source>)
Argument Type Required Notes
trend_period int Param or literal Yes Bars back used to establish the prior trend. Default 5, bounds 1–100.
body_ratio float Param or literal Yes Largest body, as a fraction of the range. Default 0.33, bounds 0.05–0.9.
shadow_ratio float Param or literal Yes Minimum shadow length in body-multiples. Default 2.0, bounds 1.0–10.0.
on= symbol No Source symbol. Defaults to the trade symbol. Reads open, high, low, close.

Formula

Small body near the low, upper shadow at least shadow_ratio × body, lower shadow no larger than the body, in an uptrend context.

Warmup

trend_period bars.

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 ShootingStarExit(Strategy):
"""Act on the pattern only in the direction of the longer trend."""
trade = Symbol()
sizing = FixedCapital()
def execute(self):
p = ShootingStar(5, 0.33, 2.0, 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 rejection")
if p.value < 0 and self.trade.is_long:
self.sell(self.trade, self.trade.position, reason="Shooting star")

Notes

  • Same geometry as InvertedHammer, opposite trend context.