> For the complete documentation index, see [llms.txt](https://indicators.agenatrader.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://indicators.agenatrader.com/standard-indicators/candlestickpattern.md).

# CandleStickPattern

#### Description <a href="#description_13" id="description_13"></a>

The CandleStickPattern indicator looks for specific candlestick formations.

#### Further information <a href="#further-information_8" id="further-information_8"></a>

Explanations of the formations and their interpretations can be found here: <http://en.wikipedia.org/wiki/Candlestick_pattern>

#### Usage <a href="#usage_14" id="usage_14"></a>

```csharp
CandleStickPattern(CandleStickPattern pattern, int trendStrength)
CandleStickPattern(IDataSeries input, CandleStickPattern pattern, int trendStrength)
CandleStickPattern(CandleStickPattern pattern, int trendStrength)[int barsAgo]
CandleStickPattern(IDataSeries input, CandleStickPattern pattern, int trendStrength)[int barsAgo]
```

#### Return value <a href="#return-value_14" id="return-value_14"></a>

**double**

0 – Pattern not existent 1 – Pattern existent

When using this method with an index (e.g. **CandleStickPattern**(...)\[**int** barsAgo] ), the value of the indicator will be outputted for the referenced bar.

#### Parameters <a href="#parameters_12" id="parameters_12"></a>

|               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| InSeries      | Input data series for the indicator                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| pattern       | <p>Possible values are:<br>CandleStickPattern.BearishBeltHold,<br>CandleStickPattern.BearishEngulfing,<br>CandleStickPattern.BearishHarami,<br>CandleStickPattern.BearishHaramiCross,<br>CandleStickPattern.BullishBeltHold,<br>CandleStickPattern.BullishEngulfing,<br>CandleStickPattern.BullishHarami,<br>CandleStickPattern.BullishHaramiCross,<br>CandleStickPattern.DarkCloudCover,<br>CandleStickPattern.Doji,<br>CandleStickPattern.DownsideTasukiGap,<br>CandleStickPattern.EveningStar,<br>CandleStickPattern.FallingThreeMethods,<br>CandleStickPattern.Hammer,<br>CandleStickPattern.HangingMan,<br>CandleStickPattern.InvertedHammer,<br>CandleStickPattern.MorningStart,<br>CandleStickPattern.PiercingLine,<br>CandleStickPattern.RisingThreeMethods,<br>CandleStickPattern.ShootingStar,<br>CandleStickPattern.StickSandwich,<br>CandleStickPattern.ThreeBlackCrows,<br>CandleStickPattern.ThreeWhiteSoldiers,<br>CandleStickPattern.UpsideGapTwoCrows,<br>CandleStickPattern.UpsideTasukiGap</p> |
| trendStrength | Signifies the number of bars to the left and right of the swing high or swing low that are used to identify a trend. The value 0 turns off the search, meaning that the only thing searched for is chart patterns.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

#### Visualization <a href="#visualization_15" id="visualization_15"></a>

![CandleStickPattern](https://agenatrader.github.io/AgenaIndicator-documentation/media/CandleStickPattern.jpg)

#### Example <a href="#example_14" id="example_14"></a>

```csharp
if (CandelStickPattern(CandleStickPattern.ShootingStar, 5)[0] == 1)
Print("Pattern ShootingStar found!");
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://indicators.agenatrader.com/standard-indicators/candlestickpattern.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
