# Candle patterns reference

> All 11 candle patterns in AlgoBarsX, each with its parameters, defaults, ranges and an example: engulfing, hammer, shooting_star, doji, pin_bar, inside_bar, outside_bar, morning_star, evening_star, three_soldiers and 1 more.

Source: https://algobarsx.com/docs/ref-fn-patterns/

### `engulfing(direction = both, on = bars())` → series<bool>

Bullish or bearish engulfing candle.

#### Parameters

| Name | Type | Default | What it is |
| --- | --- | --- | --- |
| `direction` | string | `both` | up, down or both. |
| `on` | BarSet | `bars()` | Bars to calculate on; defaults to the script's own bars. |

```algobarsx
signal = engulfing()
```

Works in: strategy, indicator, alert, library. Since 1.0.

### `hammer(on = bars())` → series<bool>

Hammer candle.

#### Parameters

| Name | Type | Default | What it is |
| --- | --- | --- | --- |
| `on` | BarSet | `bars()` | Bars to calculate on; defaults to the script's own bars. |

```algobarsx
signal = hammer()
```

Works in: strategy, indicator, alert, library. Since 1.0.

### `shooting_star(on = bars())` → series<bool>

Shooting star candle.

#### Parameters

| Name | Type | Default | What it is |
| --- | --- | --- | --- |
| `on` | BarSet | `bars()` | Bars to calculate on; defaults to the script's own bars. |

```algobarsx
signal = shooting_star()
```

Works in: strategy, indicator, alert, library. Since 1.0.

### `doji(max_body = 10%, on = bars())` → series<bool>

Doji candle.

#### Parameters

| Name | Type | Default | What it is |
| --- | --- | --- | --- |
| `max_body` | percent | `10%` | Largest body as a share of the range. |
| `on` | BarSet | `bars()` | Bars to calculate on; defaults to the script's own bars. |

```algobarsx
signal = doji()
```

Works in: strategy, indicator, alert, library. Since 1.0.

### `pin_bar(min_wick = 66%, on = bars())` → series<bool>

Pin bar.

#### Parameters

| Name | Type | Default | What it is |
| --- | --- | --- | --- |
| `min_wick` | percent | `66%` | Smallest wick as a share of the range. |
| `on` | BarSet | `bars()` | Bars to calculate on; defaults to the script's own bars. |

```algobarsx
signal = pin_bar()
```

Works in: strategy, indicator, alert, library. Since 1.0.

### `inside_bar(on = bars())` → series<bool>

Bar inside the previous bar.

#### Parameters

| Name | Type | Default | What it is |
| --- | --- | --- | --- |
| `on` | BarSet | `bars()` | Bars to calculate on; defaults to the script's own bars. |

```algobarsx
signal = inside_bar()
```

Works in: strategy, indicator, alert, library. Since 1.0.

### `outside_bar(on = bars())` → series<bool>

Bar engulfing the previous bar.

#### Parameters

| Name | Type | Default | What it is |
| --- | --- | --- | --- |
| `on` | BarSet | `bars()` | Bars to calculate on; defaults to the script's own bars. |

```algobarsx
signal = outside_bar()
```

Works in: strategy, indicator, alert, library. Since 1.0.

### `morning_star(on = bars())` → series<bool>

Morning star, three bars.

#### Parameters

| Name | Type | Default | What it is |
| --- | --- | --- | --- |
| `on` | BarSet | `bars()` | Bars to calculate on; defaults to the script's own bars. |

```algobarsx
signal = morning_star()
```

Works in: strategy, indicator, alert, library. Since 1.0.

### `evening_star(on = bars())` → series<bool>

Evening star, three bars.

#### Parameters

| Name | Type | Default | What it is |
| --- | --- | --- | --- |
| `on` | BarSet | `bars()` | Bars to calculate on; defaults to the script's own bars. |

```algobarsx
signal = evening_star()
```

Works in: strategy, indicator, alert, library. Since 1.0.

### `three_soldiers(on = bars())` → series<bool>

Three white soldiers.

#### Parameters

| Name | Type | Default | What it is |
| --- | --- | --- | --- |
| `on` | BarSet | `bars()` | Bars to calculate on; defaults to the script's own bars. |

```algobarsx
signal = three_soldiers()
```

Works in: strategy, indicator, alert, library. Since 1.0.

### `three_crows(on = bars())` → series<bool>

Three black crows.

#### Parameters

| Name | Type | Default | What it is |
| --- | --- | --- | --- |
| `on` | BarSet | `bars()` | Bars to calculate on; defaults to the script's own bars. |

```algobarsx
signal = three_crows()
```

Works in: strategy, indicator, alert, library. Since 1.0.
