# Shooting Star

`D06-F02-A09` · Price Action and Candlesticks → Single-Candle Patterns · archetype `record-transform` · difficulty 3/5 · verification **contract**

Full page: https://docs.thefintechbuilder.com/price-action-and-candlesticks/single-candle-patterns/shooting-star/
Agent skill: `npx skills add IslamBaraka90/Fintech-Algorithms-Library` — https://docs.thefintechbuilder.com/guides/agent-skill/

## Install and import

```bash
npm install fintech-algorithms
```

```ts
import { shootingStar } from "fintech-algorithms/price-action-and-candlesticks/single-candle-patterns/shooting-star";
```

## Signature

```ts
shootingStar(inputs)
```

Evaluates one candle against explicit shooting-star geometry, scale, and uptrend context conventions.

## Parameters

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `inputs` | `{ current: { open: number; high: number; low: number; close: number }; prior_bodies: number[]; prior_ranges: number[]; trend_context: string; tick_size: number }` | yes | Record containing `current`, prior body/range history, `trend_context`, and `tick_size`. |

## Returns

`{ topic_id, pattern, matched, state, direction, trend_context, required_context, body, upper_shadow, lower_shadow, range, body_scale, range_scale, history_count, geometry_score, checks, failed_checks }`

One pattern record. `state` is `warmup`, `wrong-context`, `matched`, or `not-matched`; this is not a positional series.

## Warm-up

The first `5 prior observations` positions are `state: warmup`. The detector returns one readiness record before five prior body/range observations are available; it does not emit a positional null prefix.

## Errors

- When OHLC, history, context, or tick-size input violates the data contract — throws

## Complexity

Time `undefined`, space `undefined`.

## Worked example

Captured by running this function on the input its own test provides. Real output of real code — but not asserted against a published figure.

### Input

`inputs`:

```json
{
  "current": {
    "open": 100,
    "high": 103,
    "low": 99.8,
    "close": 101
  },
  "prior_bodies": [2, 2.2, 1.8, 2.1, 1.9, 2],
  "prior_ranges": [5, 5, 5, 5, 5, 5],
  "trend_context": "uptrend",
  "tick_size": 0.1
}
```

### Call

```ts
shootingStar(inputs)
```

### Returns

object with 17 fields: topic_id, pattern, matched, state, direction, trend_context, required_context, body, …

```json
{
  "topic_id": "D06-F02-A09",
  "pattern": "Shooting Star",
  "matched": true,
  "state": "matched",
  "direction": "bullish",
  "trend_context": "uptrend",
  "required_context": "uptrend",
  "body": 1,
  "upper_shadow": 2,
  "lower_shadow": 0.20000000000000284,
  "range": 3.200000000000003,
  "body_scale": 2,
  "range_scale": 5,
  "history_count": 10
}
```

Showing 14 of 17 fields.

## Other exports

`calculate`, `shadowToBodyRatio`, `gapClassification`, `trendContextFilter`, `doji`, `dragonflyDoji`, `gravestoneDoji`, `marubozu`, `spinningTop`, `hammer`, `hangingMan`, `invertedHammer`, `bullishEngulfing`, `bearishEngulfing`, `bullishHarami`, `bearishHarami`, `piercingLine`, `darkCloudCover`, `tweezerTop`, `tweezerBottom`. Every module additionally exports `run` as an alias of its primary
function, and a `meta` object carrying its catalog id, domain, family, shape and article URL.

## Verification and provenance

Tier: **contract**.

The module loads, the entry point is callable and its declared signature matches the compiled code. The example below is real captured output, but no independently published figure asserts the numbers.

Both tiers guarantee the signature. Full explanation: https://docs.thefintechbuilder.com/guides/verification/

Generated from the docs.json payload shipped inside fintech-algorithms@0.12.0.
The signature and parameter list are checked against the compiled implementation at build time,
so a description that contradicts the code fails the build rather than reaching this file.

## Links

- Article (how it works, step by step): https://thefintechbuilder.com/price-action-and-candlesticks/single-candle-patterns/shooting-star/
- Implementation source: https://github.com/IslamBaraka90/Fintech-Algorithms-Library/blob/main/src/price-action-and-candlesticks/single-candle-patterns/shooting-star/impl.ts
- Package on npm: https://www.npmjs.com/package/fintech-algorithms
- Domain index for agents: https://docs.thefintechbuilder.com/price-action-and-candlesticks/llms.txt
