# 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!");
```
