Lean  $LEAN_TAG$
CandlestickPatterns.cs
1 /*
2  * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3  * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  *
15 */
16 
17 using System;
18 using QuantConnect.Data;
21 
22 namespace QuantConnect.Algorithm
23 {
24  /// <summary>
25  /// Provides helpers for using candlestick patterns
26  /// </summary>
27  public class CandlestickPatterns
28  {
29  private readonly QCAlgorithm _algorithm;
30 
31  /// <summary>
32  /// Initializes a new instance of the <see cref="CandlestickPatterns"/> class
33  /// </summary>
34  /// <param name="algorithm">The algorithm instance</param>
35  public CandlestickPatterns(QCAlgorithm algorithm)
36  {
37  _algorithm = algorithm;
38  }
39 
40  /// <summary>
41  /// Creates a new <see cref="Indicators.CandlestickPatterns.TwoCrows"/> pattern indicator.
42  /// The indicator will be automatically updated on the given resolution.
43  /// </summary>
44  /// <param name="symbol">The symbol whose pattern we seek</param>
45  /// <param name="resolution">The resolution.</param>
46  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
47  /// <returns>The pattern indicator for the requested symbol.</returns>
48  public TwoCrows TwoCrows(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
49  {
50  var name = _algorithm.CreateIndicatorName(symbol, "TWOCROWS", resolution);
51  var pattern = new TwoCrows(name);
52  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
53  return pattern;
54  }
55 
56  /// <summary>
57  /// Creates a new <see cref="Indicators.CandlestickPatterns.ThreeBlackCrows"/> pattern indicator.
58  /// The indicator will be automatically updated on the given resolution.
59  /// </summary>
60  /// <param name="symbol">The symbol whose pattern we seek</param>
61  /// <param name="resolution">The resolution.</param>
62  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
63  /// <returns>The pattern indicator for the requested symbol.</returns>
64  public ThreeBlackCrows ThreeBlackCrows(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
65  {
66  var name = _algorithm.CreateIndicatorName(symbol, "THREEBLACKCROWS", resolution);
67  var pattern = new ThreeBlackCrows(name);
68  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
69  return pattern;
70  }
71 
72  /// <summary>
73  /// Creates a new <see cref="Indicators.CandlestickPatterns.ThreeInside"/> pattern indicator.
74  /// The indicator will be automatically updated on the given resolution.
75  /// </summary>
76  /// <param name="symbol">The symbol whose pattern we seek</param>
77  /// <param name="resolution">The resolution.</param>
78  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
79  /// <returns>The pattern indicator for the requested symbol.</returns>
80  public ThreeInside ThreeInside(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
81  {
82  var name = _algorithm.CreateIndicatorName(symbol, "THREEINSIDE", resolution);
83  var pattern = new ThreeInside(name);
84  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
85  return pattern;
86  }
87 
88  /// <summary>
89  /// Creates a new <see cref="Indicators.CandlestickPatterns.ThreeLineStrike"/> pattern indicator.
90  /// The indicator will be automatically updated on the given resolution.
91  /// </summary>
92  /// <param name="symbol">The symbol whose pattern we seek</param>
93  /// <param name="resolution">The resolution.</param>
94  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
95  /// <returns>The pattern indicator for the requested symbol.</returns>
96  public ThreeLineStrike ThreeLineStrike(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
97  {
98  var name = _algorithm.CreateIndicatorName(symbol, "THREELINESTRIKE", resolution);
99  var pattern = new ThreeLineStrike(name);
100  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
101  return pattern;
102  }
103 
104  /// <summary>
105  /// Creates a new <see cref="Indicators.CandlestickPatterns.ThreeOutside"/> pattern indicator.
106  /// The indicator will be automatically updated on the given resolution.
107  /// </summary>
108  /// <param name="symbol">The symbol whose pattern we seek</param>
109  /// <param name="resolution">The resolution.</param>
110  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
111  /// <returns>The pattern indicator for the requested symbol.</returns>
112  public ThreeOutside ThreeOutside(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
113  {
114  var name = _algorithm.CreateIndicatorName(symbol, "THREEOUTSIDE", resolution);
115  var pattern = new ThreeOutside(name);
116  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
117  return pattern;
118  }
119 
120  /// <summary>
121  /// Creates a new <see cref="Indicators.CandlestickPatterns.ThreeStarsInSouth"/> pattern indicator.
122  /// The indicator will be automatically updated on the given resolution.
123  /// </summary>
124  /// <param name="symbol">The symbol whose pattern we seek</param>
125  /// <param name="resolution">The resolution.</param>
126  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
127  /// <returns>The pattern indicator for the requested symbol.</returns>
128  public ThreeStarsInSouth ThreeStarsInSouth(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
129  {
130  var name = _algorithm.CreateIndicatorName(symbol, "THREESTARSINSOUTH", resolution);
131  var pattern = new ThreeStarsInSouth(name);
132  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
133  return pattern;
134  }
135 
136  /// <summary>
137  /// Creates a new <see cref="Indicators.CandlestickPatterns.ThreeWhiteSoldiers"/> pattern indicator.
138  /// The indicator will be automatically updated on the given resolution.
139  /// </summary>
140  /// <param name="symbol">The symbol whose pattern we seek</param>
141  /// <param name="resolution">The resolution.</param>
142  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
143  /// <returns>The pattern indicator for the requested symbol.</returns>
144  public ThreeWhiteSoldiers ThreeWhiteSoldiers(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
145  {
146  var name = _algorithm.CreateIndicatorName(symbol, "THREEWHITESOLDIERS", resolution);
147  var pattern = new ThreeWhiteSoldiers(name);
148  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
149  return pattern;
150  }
151 
152  /// <summary>
153  /// Creates a new <see cref="Indicators.CandlestickPatterns.AbandonedBaby"/> pattern indicator.
154  /// The indicator will be automatically updated on the given resolution.
155  /// </summary>
156  /// <param name="symbol">The symbol whose pattern we seek</param>
157  /// <param name="penetration">Percentage of penetration of a candle within another candle</param>
158  /// <param name="resolution">The resolution.</param>
159  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
160  /// <returns>The pattern indicator for the requested symbol.</returns>
161  public AbandonedBaby AbandonedBaby(Symbol symbol, decimal penetration = 0.3m, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
162  {
163  var name = _algorithm.CreateIndicatorName(symbol, "ABANDONEDBABY", resolution);
164  var pattern = new AbandonedBaby(name, penetration);
165  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
166  return pattern;
167  }
168 
169  /// <summary>
170  /// Creates a new <see cref="Indicators.CandlestickPatterns.AdvanceBlock"/> pattern indicator.
171  /// The indicator will be automatically updated on the given resolution.
172  /// </summary>
173  /// <param name="symbol">The symbol whose pattern we seek</param>
174  /// <param name="resolution">The resolution.</param>
175  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
176  /// <returns>The pattern indicator for the requested symbol.</returns>
177  public AdvanceBlock AdvanceBlock(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
178  {
179  var name = _algorithm.CreateIndicatorName(symbol, "ADVANCEBLOCK", resolution);
180  var pattern = new AdvanceBlock(name);
181  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
182  return pattern;
183  }
184 
185  /// <summary>
186  /// Creates a new <see cref="Indicators.CandlestickPatterns.BeltHold"/> pattern indicator.
187  /// The indicator will be automatically updated on the given resolution.
188  /// </summary>
189  /// <param name="symbol">The symbol whose pattern we seek</param>
190  /// <param name="resolution">The resolution.</param>
191  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
192  /// <returns>The pattern indicator for the requested symbol.</returns>
193  public BeltHold BeltHold(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
194  {
195  var name = _algorithm.CreateIndicatorName(symbol, "BELTHOLD", resolution);
196  var pattern = new BeltHold(name);
197  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
198  return pattern;
199  }
200 
201  /// <summary>
202  /// Creates a new <see cref="Indicators.CandlestickPatterns.Breakaway"/> pattern indicator.
203  /// The indicator will be automatically updated on the given resolution.
204  /// </summary>
205  /// <param name="symbol">The symbol whose pattern we seek</param>
206  /// <param name="resolution">The resolution.</param>
207  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
208  /// <returns>The pattern indicator for the requested symbol.</returns>
209  public Breakaway Breakaway(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
210  {
211  var name = _algorithm.CreateIndicatorName(symbol, "BREAKAWAY", resolution);
212  var pattern = new Breakaway(name);
213  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
214  return pattern;
215  }
216 
217  /// <summary>
218  /// Creates a new <see cref="Indicators.CandlestickPatterns.ClosingMarubozu"/> pattern indicator.
219  /// The indicator will be automatically updated on the given resolution.
220  /// </summary>
221  /// <param name="symbol">The symbol whose pattern we seek</param>
222  /// <param name="resolution">The resolution.</param>
223  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
224  /// <returns>The pattern indicator for the requested symbol.</returns>
225  public ClosingMarubozu ClosingMarubozu(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
226  {
227  var name = _algorithm.CreateIndicatorName(symbol, "CLOSINGMARUBOZU", resolution);
228  var pattern = new ClosingMarubozu(name);
229  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
230  return pattern;
231  }
232 
233  /// <summary>
234  /// Creates a new <see cref="Indicators.CandlestickPatterns.ConcealedBabySwallow"/> pattern indicator.
235  /// The indicator will be automatically updated on the given resolution.
236  /// </summary>
237  /// <param name="symbol">The symbol whose pattern we seek</param>
238  /// <param name="resolution">The resolution.</param>
239  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
240  /// <returns>The pattern indicator for the requested symbol.</returns>
241  public ConcealedBabySwallow ConcealedBabySwallow(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
242  {
243  var name = _algorithm.CreateIndicatorName(symbol, "CONCEALEDBABYSWALLOW", resolution);
244  var pattern = new ConcealedBabySwallow(name);
245  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
246  return pattern;
247  }
248 
249  /// <summary>
250  /// Creates a new <see cref="Indicators.CandlestickPatterns.Counterattack"/> pattern indicator.
251  /// The indicator will be automatically updated on the given resolution.
252  /// </summary>
253  /// <param name="symbol">The symbol whose pattern we seek</param>
254  /// <param name="resolution">The resolution.</param>
255  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
256  /// <returns>The pattern indicator for the requested symbol.</returns>
257  public Counterattack Counterattack(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
258  {
259  var name = _algorithm.CreateIndicatorName(symbol, "COUNTERATTACK", resolution);
260  var pattern = new Counterattack(name);
261  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
262  return pattern;
263  }
264 
265  /// <summary>
266  /// Creates a new <see cref="Indicators.CandlestickPatterns.DarkCloudCover"/> pattern indicator.
267  /// The indicator will be automatically updated on the given resolution.
268  /// </summary>
269  /// <param name="symbol">The symbol whose pattern we seek</param>
270  /// <param name="penetration">Percentage of penetration of a candle within another candle</param>
271  /// <param name="resolution">The resolution.</param>
272  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
273  /// <returns>The pattern indicator for the requested symbol.</returns>
274  public DarkCloudCover DarkCloudCover(Symbol symbol, decimal penetration = 0.5m, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
275  {
276  var name = _algorithm.CreateIndicatorName(symbol, "DARKCLOUDCOVER", resolution);
277  var pattern = new DarkCloudCover(name, penetration);
278  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
279  return pattern;
280  }
281 
282  /// <summary>
283  /// Creates a new <see cref="Indicators.CandlestickPatterns.Doji"/> pattern indicator.
284  /// The indicator will be automatically updated on the given resolution.
285  /// </summary>
286  /// <param name="symbol">The symbol whose pattern we seek</param>
287  /// <param name="resolution">The resolution.</param>
288  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
289  /// <returns>The pattern indicator for the requested symbol.</returns>
290  public Doji Doji(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
291  {
292  var name = _algorithm.CreateIndicatorName(symbol, "DOJI", resolution);
293  var pattern = new Doji(name);
294  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
295  return pattern;
296  }
297 
298  /// <summary>
299  /// Creates a new <see cref="Indicators.CandlestickPatterns.DojiStar"/> pattern indicator.
300  /// The indicator will be automatically updated on the given resolution.
301  /// </summary>
302  /// <param name="symbol">The symbol whose pattern we seek</param>
303  /// <param name="resolution">The resolution.</param>
304  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
305  /// <returns>The pattern indicator for the requested symbol.</returns>
306  public DojiStar DojiStar(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
307  {
308  var name = _algorithm.CreateIndicatorName(symbol, "DOJISTAR", resolution);
309  var pattern = new DojiStar(name);
310  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
311  return pattern;
312  }
313 
314  /// <summary>
315  /// Creates a new <see cref="Indicators.CandlestickPatterns.DragonflyDoji"/> pattern indicator.
316  /// The indicator will be automatically updated on the given resolution.
317  /// </summary>
318  /// <param name="symbol">The symbol whose pattern we seek</param>
319  /// <param name="resolution">The resolution.</param>
320  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
321  /// <returns>The pattern indicator for the requested symbol.</returns>
322  public DragonflyDoji DragonflyDoji(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
323  {
324  var name = _algorithm.CreateIndicatorName(symbol, "DRAGONFLYDOJI", resolution);
325  var pattern = new DragonflyDoji(name);
326  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
327  return pattern;
328  }
329 
330  /// <summary>
331  /// Creates a new <see cref="Indicators.CandlestickPatterns.Engulfing"/> pattern indicator.
332  /// The indicator will be automatically updated on the given resolution.
333  /// </summary>
334  /// <param name="symbol">The symbol whose pattern we seek</param>
335  /// <param name="resolution">The resolution.</param>
336  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
337  /// <returns>The pattern indicator for the requested symbol.</returns>
338  public Engulfing Engulfing(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
339  {
340  var name = _algorithm.CreateIndicatorName(symbol, "ENGULFING", resolution);
341  var pattern = new Engulfing(name);
342  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
343  return pattern;
344  }
345 
346  /// <summary>
347  /// Creates a new <see cref="Indicators.CandlestickPatterns.EveningDojiStar"/> pattern indicator.
348  /// The indicator will be automatically updated on the given resolution.
349  /// </summary>
350  /// <param name="symbol">The symbol whose pattern we seek</param>
351  /// <param name="penetration">Percentage of penetration of a candle within another candle</param>
352  /// <param name="resolution">The resolution.</param>
353  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
354  /// <returns>The pattern indicator for the requested symbol.</returns>
355  public EveningDojiStar EveningDojiStar(Symbol symbol, decimal penetration = 0.3m, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
356  {
357  var name = _algorithm.CreateIndicatorName(symbol, "EVENINGDOJISTAR", resolution);
358  var pattern = new EveningDojiStar(name, penetration);
359  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
360  return pattern;
361  }
362 
363  /// <summary>
364  /// Creates a new <see cref="Indicators.CandlestickPatterns.EveningStar"/> pattern indicator.
365  /// The indicator will be automatically updated on the given resolution.
366  /// </summary>
367  /// <param name="symbol">The symbol whose pattern we seek</param>
368  /// <param name="penetration">Percentage of penetration of a candle within another candle</param>
369  /// <param name="resolution">The resolution.</param>
370  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
371  /// <returns>The pattern indicator for the requested symbol.</returns>
372  public EveningStar EveningStar(Symbol symbol, decimal penetration = 0.3m, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
373  {
374  var name = _algorithm.CreateIndicatorName(symbol, "EVENINGSTAR", resolution);
375  var pattern = new EveningStar(name, penetration);
376  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
377  return pattern;
378  }
379 
380  /// <summary>
381  /// Creates a new <see cref="Indicators.CandlestickPatterns.GapSideBySideWhite"/> pattern indicator.
382  /// The indicator will be automatically updated on the given resolution.
383  /// </summary>
384  /// <param name="symbol">The symbol whose pattern we seek</param>
385  /// <param name="resolution">The resolution.</param>
386  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
387  /// <returns>The pattern indicator for the requested symbol.</returns>
388  public GapSideBySideWhite GapSideBySideWhite(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
389  {
390  var name = _algorithm.CreateIndicatorName(symbol, "GAPSIDEBYSIDEWHITE", resolution);
391  var pattern = new GapSideBySideWhite(name);
392  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
393  return pattern;
394  }
395 
396  /// <summary>
397  /// Creates a new <see cref="Indicators.CandlestickPatterns.GravestoneDoji"/> pattern indicator.
398  /// The indicator will be automatically updated on the given resolution.
399  /// </summary>
400  /// <param name="symbol">The symbol whose pattern we seek</param>
401  /// <param name="resolution">The resolution.</param>
402  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
403  /// <returns>The pattern indicator for the requested symbol.</returns>
404  public GravestoneDoji GravestoneDoji(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
405  {
406  var name = _algorithm.CreateIndicatorName(symbol, "GRAVESTONEDOJI", resolution);
407  var pattern = new GravestoneDoji(name);
408  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
409  return pattern;
410  }
411 
412  /// <summary>
413  /// Creates a new <see cref="Indicators.CandlestickPatterns.Hammer"/> pattern indicator.
414  /// The indicator will be automatically updated on the given resolution.
415  /// </summary>
416  /// <param name="symbol">The symbol whose pattern we seek</param>
417  /// <param name="resolution">The resolution.</param>
418  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
419  /// <returns>The pattern indicator for the requested symbol.</returns>
420  public Hammer Hammer(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
421  {
422  var name = _algorithm.CreateIndicatorName(symbol, "HAMMER", resolution);
423  var pattern = new Hammer(name);
424  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
425  return pattern;
426  }
427 
428  /// <summary>
429  /// Creates a new <see cref="Indicators.CandlestickPatterns.HangingMan"/> pattern indicator.
430  /// The indicator will be automatically updated on the given resolution.
431  /// </summary>
432  /// <param name="symbol">The symbol whose pattern we seek</param>
433  /// <param name="resolution">The resolution.</param>
434  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
435  /// <returns>The pattern indicator for the requested symbol.</returns>
436  public HangingMan HangingMan(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
437  {
438  var name = _algorithm.CreateIndicatorName(symbol, "HANGINGMAN", resolution);
439  var pattern = new HangingMan(name);
440  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
441  return pattern;
442  }
443 
444  /// <summary>
445  /// Creates a new <see cref="Indicators.CandlestickPatterns.Harami"/> pattern indicator.
446  /// The indicator will be automatically updated on the given resolution.
447  /// </summary>
448  /// <param name="symbol">The symbol whose pattern we seek</param>
449  /// <param name="resolution">The resolution.</param>
450  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
451  /// <returns>The pattern indicator for the requested symbol.</returns>
452  public Harami Harami(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
453  {
454  var name = _algorithm.CreateIndicatorName(symbol, "HARAMI", resolution);
455  var pattern = new Harami(name);
456  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
457  return pattern;
458  }
459 
460  /// <summary>
461  /// Creates a new <see cref="Indicators.CandlestickPatterns.HaramiCross"/> pattern indicator.
462  /// The indicator will be automatically updated on the given resolution.
463  /// </summary>
464  /// <param name="symbol">The symbol whose pattern we seek</param>
465  /// <param name="resolution">The resolution.</param>
466  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
467  /// <returns>The pattern indicator for the requested symbol.</returns>
468  public HaramiCross HaramiCross(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
469  {
470  var name = _algorithm.CreateIndicatorName(symbol, "HARAMICROSS", resolution);
471  var pattern = new HaramiCross(name);
472  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
473  return pattern;
474  }
475 
476  /// <summary>
477  /// Creates a new <see cref="Indicators.CandlestickPatterns.HighWaveCandle"/> pattern indicator.
478  /// The indicator will be automatically updated on the given resolution.
479  /// </summary>
480  /// <param name="symbol">The symbol whose pattern we seek</param>
481  /// <param name="resolution">The resolution.</param>
482  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
483  /// <returns>The pattern indicator for the requested symbol.</returns>
484  public HighWaveCandle HighWaveCandle(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
485  {
486  var name = _algorithm.CreateIndicatorName(symbol, "HIGHWAVECANDLE", resolution);
487  var pattern = new HighWaveCandle(name);
488  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
489  return pattern;
490  }
491 
492  /// <summary>
493  /// Creates a new <see cref="Indicators.CandlestickPatterns.Hikkake"/> pattern indicator.
494  /// The indicator will be automatically updated on the given resolution.
495  /// </summary>
496  /// <param name="symbol">The symbol whose pattern we seek</param>
497  /// <param name="resolution">The resolution.</param>
498  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
499  /// <returns>The pattern indicator for the requested symbol.</returns>
500  public Hikkake Hikkake(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
501  {
502  var name = _algorithm.CreateIndicatorName(symbol, "HIKKAKE", resolution);
503  var pattern = new Hikkake(name);
504  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
505  return pattern;
506  }
507 
508  /// <summary>
509  /// Creates a new <see cref="Indicators.CandlestickPatterns.HikkakeModified"/> pattern indicator.
510  /// The indicator will be automatically updated on the given resolution.
511  /// </summary>
512  /// <param name="symbol">The symbol whose pattern we seek</param>
513  /// <param name="resolution">The resolution.</param>
514  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
515  /// <returns>The pattern indicator for the requested symbol.</returns>
516  public HikkakeModified HikkakeModified(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
517  {
518  var name = _algorithm.CreateIndicatorName(symbol, "HIKKAKEMODIFIED", resolution);
519  var pattern = new HikkakeModified(name);
520  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
521  return pattern;
522  }
523 
524  /// <summary>
525  /// Creates a new <see cref="Indicators.CandlestickPatterns.HomingPigeon"/> pattern indicator.
526  /// The indicator will be automatically updated on the given resolution.
527  /// </summary>
528  /// <param name="symbol">The symbol whose pattern we seek</param>
529  /// <param name="resolution">The resolution.</param>
530  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
531  /// <returns>The pattern indicator for the requested symbol.</returns>
532  public HomingPigeon HomingPigeon(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
533  {
534  var name = _algorithm.CreateIndicatorName(symbol, "HOMINGPIGEON", resolution);
535  var pattern = new HomingPigeon(name);
536  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
537  return pattern;
538  }
539 
540  /// <summary>
541  /// Creates a new <see cref="Indicators.CandlestickPatterns.IdenticalThreeCrows"/> pattern indicator.
542  /// The indicator will be automatically updated on the given resolution.
543  /// </summary>
544  /// <param name="symbol">The symbol whose pattern we seek</param>
545  /// <param name="resolution">The resolution.</param>
546  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
547  /// <returns>The pattern indicator for the requested symbol.</returns>
548  public IdenticalThreeCrows IdenticalThreeCrows(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
549  {
550  var name = _algorithm.CreateIndicatorName(symbol, "IDENTICALTHREECROWS", resolution);
551  var pattern = new IdenticalThreeCrows(name);
552  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
553  return pattern;
554  }
555 
556  /// <summary>
557  /// Creates a new <see cref="Indicators.CandlestickPatterns.InNeck"/> pattern indicator.
558  /// The indicator will be automatically updated on the given resolution.
559  /// </summary>
560  /// <param name="symbol">The symbol whose pattern we seek</param>
561  /// <param name="resolution">The resolution.</param>
562  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
563  /// <returns>The pattern indicator for the requested symbol.</returns>
564  public InNeck InNeck(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
565  {
566  var name = _algorithm.CreateIndicatorName(symbol, "INNECK", resolution);
567  var pattern = new InNeck(name);
568  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
569  return pattern;
570  }
571 
572  /// <summary>
573  /// Creates a new <see cref="Indicators.CandlestickPatterns.InvertedHammer"/> pattern indicator.
574  /// The indicator will be automatically updated on the given resolution.
575  /// </summary>
576  /// <param name="symbol">The symbol whose pattern we seek</param>
577  /// <param name="resolution">The resolution.</param>
578  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
579  /// <returns>The pattern indicator for the requested symbol.</returns>
580  public InvertedHammer InvertedHammer(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
581  {
582  var name = _algorithm.CreateIndicatorName(symbol, "INVERTEDHAMMER", resolution);
583  var pattern = new InvertedHammer(name);
584  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
585  return pattern;
586  }
587 
588  /// <summary>
589  /// Creates a new <see cref="Indicators.CandlestickPatterns.Kicking"/> pattern indicator.
590  /// The indicator will be automatically updated on the given resolution.
591  /// </summary>
592  /// <param name="symbol">The symbol whose pattern we seek</param>
593  /// <param name="resolution">The resolution.</param>
594  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
595  /// <returns>The pattern indicator for the requested symbol.</returns>
596  public Kicking Kicking(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
597  {
598  var name = _algorithm.CreateIndicatorName(symbol, "KICKING", resolution);
599  var pattern = new Kicking(name);
600  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
601  return pattern;
602  }
603 
604  /// <summary>
605  /// Creates a new <see cref="Indicators.CandlestickPatterns.KickingByLength"/> pattern indicator.
606  /// The indicator will be automatically updated on the given resolution.
607  /// </summary>
608  /// <param name="symbol">The symbol whose pattern we seek</param>
609  /// <param name="resolution">The resolution.</param>
610  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
611  /// <returns>The pattern indicator for the requested symbol.</returns>
612  public KickingByLength KickingByLength(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
613  {
614  var name = _algorithm.CreateIndicatorName(symbol, "KICKINGBYLENGTH", resolution);
615  var pattern = new KickingByLength(name);
616  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
617  return pattern;
618  }
619 
620  /// <summary>
621  /// Creates a new <see cref="Indicators.CandlestickPatterns.LadderBottom"/> pattern indicator.
622  /// The indicator will be automatically updated on the given resolution.
623  /// </summary>
624  /// <param name="symbol">The symbol whose pattern we seek</param>
625  /// <param name="resolution">The resolution.</param>
626  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
627  /// <returns>The pattern indicator for the requested symbol.</returns>
628  public LadderBottom LadderBottom(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
629  {
630  var name = _algorithm.CreateIndicatorName(symbol, "LADDERBOTTOM", resolution);
631  var pattern = new LadderBottom(name);
632  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
633  return pattern;
634  }
635 
636  /// <summary>
637  /// Creates a new <see cref="Indicators.CandlestickPatterns.LongLeggedDoji"/> pattern indicator.
638  /// The indicator will be automatically updated on the given resolution.
639  /// </summary>
640  /// <param name="symbol">The symbol whose pattern we seek</param>
641  /// <param name="resolution">The resolution.</param>
642  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
643  /// <returns>The pattern indicator for the requested symbol.</returns>
644  public LongLeggedDoji LongLeggedDoji(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
645  {
646  var name = _algorithm.CreateIndicatorName(symbol, "LONGLEGGEDDOJI", resolution);
647  var pattern = new LongLeggedDoji(name);
648  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
649  return pattern;
650  }
651 
652  /// <summary>
653  /// Creates a new <see cref="Indicators.CandlestickPatterns.LongLineCandle"/> pattern indicator.
654  /// The indicator will be automatically updated on the given resolution.
655  /// </summary>
656  /// <param name="symbol">The symbol whose pattern we seek</param>
657  /// <param name="resolution">The resolution.</param>
658  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
659  /// <returns>The pattern indicator for the requested symbol.</returns>
660  public LongLineCandle LongLineCandle(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
661  {
662  var name = _algorithm.CreateIndicatorName(symbol, "LONGLINECANDLE", resolution);
663  var pattern = new LongLineCandle(name);
664  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
665  return pattern;
666  }
667 
668  /// <summary>
669  /// Creates a new <see cref="Indicators.CandlestickPatterns.Marubozu"/> pattern indicator.
670  /// The indicator will be automatically updated on the given resolution.
671  /// </summary>
672  /// <param name="symbol">The symbol whose pattern we seek</param>
673  /// <param name="resolution">The resolution.</param>
674  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
675  /// <returns>The pattern indicator for the requested symbol.</returns>
676  public Marubozu Marubozu(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
677  {
678  var name = _algorithm.CreateIndicatorName(symbol, "MARUBOZU", resolution);
679  var pattern = new Marubozu(name);
680  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
681  return pattern;
682  }
683 
684  /// <summary>
685  /// Creates a new <see cref="Indicators.CandlestickPatterns.MatchingLow"/> pattern indicator.
686  /// The indicator will be automatically updated on the given resolution.
687  /// </summary>
688  /// <param name="symbol">The symbol whose pattern we seek</param>
689  /// <param name="resolution">The resolution.</param>
690  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
691  /// <returns>The pattern indicator for the requested symbol.</returns>
692  public MatchingLow MatchingLow(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
693  {
694  var name = _algorithm.CreateIndicatorName(symbol, "MATCHINGLOW", resolution);
695  var pattern = new MatchingLow(name);
696  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
697  return pattern;
698  }
699 
700  /// <summary>
701  /// Creates a new <see cref="Indicators.CandlestickPatterns.MatHold"/> pattern indicator.
702  /// The indicator will be automatically updated on the given resolution.
703  /// </summary>
704  /// <param name="symbol">The symbol whose pattern we seek</param>
705  /// <param name="penetration">Percentage of penetration of a candle within another candle</param>
706  /// <param name="resolution">The resolution.</param>
707  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
708  /// <returns>The pattern indicator for the requested symbol.</returns>
709  public MatHold MatHold(Symbol symbol, decimal penetration = 0.5m, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
710  {
711  var name = _algorithm.CreateIndicatorName(symbol, "MATHOLD", resolution);
712  var pattern = new MatHold(name, penetration);
713  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
714  return pattern;
715  }
716 
717  /// <summary>
718  /// Creates a new <see cref="Indicators.CandlestickPatterns.MorningDojiStar"/> pattern indicator.
719  /// The indicator will be automatically updated on the given resolution.
720  /// </summary>
721  /// <param name="symbol">The symbol whose pattern we seek</param>
722  /// <param name="penetration">Percentage of penetration of a candle within another candle</param>
723  /// <param name="resolution">The resolution.</param>
724  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
725  /// <returns>The pattern indicator for the requested symbol.</returns>
726  public MorningDojiStar MorningDojiStar(Symbol symbol, decimal penetration = 0.3m, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
727  {
728  var name = _algorithm.CreateIndicatorName(symbol, "MORNINGDOJISTAR", resolution);
729  var pattern = new MorningDojiStar(name, penetration);
730  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
731  return pattern;
732  }
733 
734  /// <summary>
735  /// Creates a new <see cref="Indicators.CandlestickPatterns.MorningStar"/> pattern indicator.
736  /// The indicator will be automatically updated on the given resolution.
737  /// </summary>
738  /// <param name="symbol">The symbol whose pattern we seek</param>
739  /// <param name="penetration">Percentage of penetration of a candle within another candle</param>
740  /// <param name="resolution">The resolution.</param>
741  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
742  /// <returns>The pattern indicator for the requested symbol.</returns>
743  public MorningStar MorningStar(Symbol symbol, decimal penetration = 0.3m, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
744  {
745  var name = _algorithm.CreateIndicatorName(symbol, "MORNINGSTAR", resolution);
746  var pattern = new MorningStar(name, penetration);
747  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
748  return pattern;
749  }
750 
751  /// <summary>
752  /// Creates a new <see cref="Indicators.CandlestickPatterns.OnNeck"/> pattern indicator.
753  /// The indicator will be automatically updated on the given resolution.
754  /// </summary>
755  /// <param name="symbol">The symbol whose pattern we seek</param>
756  /// <param name="resolution">The resolution.</param>
757  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
758  /// <returns>The pattern indicator for the requested symbol.</returns>
759  public OnNeck OnNeck(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
760  {
761  var name = _algorithm.CreateIndicatorName(symbol, "ONNECK", resolution);
762  var pattern = new OnNeck(name);
763  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
764  return pattern;
765  }
766 
767  /// <summary>
768  /// Creates a new <see cref="Indicators.CandlestickPatterns.Piercing"/> pattern indicator.
769  /// The indicator will be automatically updated on the given resolution.
770  /// </summary>
771  /// <param name="symbol">The symbol whose pattern we seek</param>
772  /// <param name="resolution">The resolution.</param>
773  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
774  /// <returns>The pattern indicator for the requested symbol.</returns>
775  public Piercing Piercing(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
776  {
777  var name = _algorithm.CreateIndicatorName(symbol, "PIERCING", resolution);
778  var pattern = new Piercing(name);
779  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
780  return pattern;
781  }
782 
783  /// <summary>
784  /// Creates a new <see cref="Indicators.CandlestickPatterns.RickshawMan"/> pattern indicator.
785  /// The indicator will be automatically updated on the given resolution.
786  /// </summary>
787  /// <param name="symbol">The symbol whose pattern we seek</param>
788  /// <param name="resolution">The resolution.</param>
789  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
790  /// <returns>The pattern indicator for the requested symbol.</returns>
791  public RickshawMan RickshawMan(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
792  {
793  var name = _algorithm.CreateIndicatorName(symbol, "RICKSHAWMAN", resolution);
794  var pattern = new RickshawMan(name);
795  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
796  return pattern;
797  }
798 
799  /// <summary>
800  /// Creates a new <see cref="Indicators.CandlestickPatterns.RiseFallThreeMethods"/> pattern indicator.
801  /// The indicator will be automatically updated on the given resolution.
802  /// </summary>
803  /// <param name="symbol">The symbol whose pattern we seek</param>
804  /// <param name="resolution">The resolution.</param>
805  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
806  /// <returns>The pattern indicator for the requested symbol.</returns>
807  public RiseFallThreeMethods RiseFallThreeMethods(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
808  {
809  var name = _algorithm.CreateIndicatorName(symbol, "RISEFALLTHREEMETHODS", resolution);
810  var pattern = new RiseFallThreeMethods(name);
811  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
812  return pattern;
813  }
814 
815  /// <summary>
816  /// Creates a new <see cref="Indicators.CandlestickPatterns.SeparatingLines"/> pattern indicator.
817  /// The indicator will be automatically updated on the given resolution.
818  /// </summary>
819  /// <param name="symbol">The symbol whose pattern we seek</param>
820  /// <param name="resolution">The resolution.</param>
821  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
822  /// <returns>The pattern indicator for the requested symbol.</returns>
823  public SeparatingLines SeparatingLines(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
824  {
825  var name = _algorithm.CreateIndicatorName(symbol, "SEPARATINGLINES", resolution);
826  var pattern = new SeparatingLines(name);
827  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
828  return pattern;
829  }
830 
831  /// <summary>
832  /// Creates a new <see cref="Indicators.CandlestickPatterns.ShootingStar"/> pattern indicator.
833  /// The indicator will be automatically updated on the given resolution.
834  /// </summary>
835  /// <param name="symbol">The symbol whose pattern we seek</param>
836  /// <param name="resolution">The resolution.</param>
837  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
838  /// <returns>The pattern indicator for the requested symbol.</returns>
839  public ShootingStar ShootingStar(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
840  {
841  var name = _algorithm.CreateIndicatorName(symbol, "SHOOTINGSTAR", resolution);
842  var pattern = new ShootingStar(name);
843  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
844  return pattern;
845  }
846 
847  /// <summary>
848  /// Creates a new <see cref="Indicators.CandlestickPatterns.ShortLineCandle"/> pattern indicator.
849  /// The indicator will be automatically updated on the given resolution.
850  /// </summary>
851  /// <param name="symbol">The symbol whose pattern we seek</param>
852  /// <param name="resolution">The resolution.</param>
853  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
854  /// <returns>The pattern indicator for the requested symbol.</returns>
855  public ShortLineCandle ShortLineCandle(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
856  {
857  var name = _algorithm.CreateIndicatorName(symbol, "SHORTLINECANDLE", resolution);
858  var pattern = new ShortLineCandle(name);
859  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
860  return pattern;
861  }
862 
863  /// <summary>
864  /// Creates a new <see cref="Indicators.CandlestickPatterns.SpinningTop"/> pattern indicator.
865  /// The indicator will be automatically updated on the given resolution.
866  /// </summary>
867  /// <param name="symbol">The symbol whose pattern we seek</param>
868  /// <param name="resolution">The resolution.</param>
869  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
870  /// <returns>The pattern indicator for the requested symbol.</returns>
871  public SpinningTop SpinningTop(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
872  {
873  var name = _algorithm.CreateIndicatorName(symbol, "SPINNINGTOP", resolution);
874  var pattern = new SpinningTop(name);
875  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
876  return pattern;
877  }
878 
879  /// <summary>
880  /// Creates a new <see cref="Indicators.CandlestickPatterns.StalledPattern"/> pattern indicator.
881  /// The indicator will be automatically updated on the given resolution.
882  /// </summary>
883  /// <param name="symbol">The symbol whose pattern we seek</param>
884  /// <param name="resolution">The resolution.</param>
885  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
886  /// <returns>The pattern indicator for the requested symbol.</returns>
887  public StalledPattern StalledPattern(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
888  {
889  var name = _algorithm.CreateIndicatorName(symbol, "STALLEDPATTERN", resolution);
890  var pattern = new StalledPattern(name);
891  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
892  return pattern;
893  }
894 
895  /// <summary>
896  /// Creates a new <see cref="Indicators.CandlestickPatterns.StickSandwich"/> pattern indicator.
897  /// The indicator will be automatically updated on the given resolution.
898  /// </summary>
899  /// <param name="symbol">The symbol whose pattern we seek</param>
900  /// <param name="resolution">The resolution.</param>
901  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
902  /// <returns>The pattern indicator for the requested symbol.</returns>
903  public StickSandwich StickSandwich(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
904  {
905  var name = _algorithm.CreateIndicatorName(symbol, "STICKSANDWICH", resolution);
906  var pattern = new StickSandwich(name);
907  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
908  return pattern;
909  }
910 
911  /// <summary>
912  /// Creates a new <see cref="Indicators.CandlestickPatterns.Takuri"/> pattern indicator.
913  /// The indicator will be automatically updated on the given resolution.
914  /// </summary>
915  /// <param name="symbol">The symbol whose pattern we seek</param>
916  /// <param name="resolution">The resolution.</param>
917  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
918  /// <returns>The pattern indicator for the requested symbol.</returns>
919  public Takuri Takuri(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
920  {
921  var name = _algorithm.CreateIndicatorName(symbol, "TAKURI", resolution);
922  var pattern = new Takuri(name);
923  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
924  return pattern;
925  }
926 
927  /// <summary>
928  /// Creates a new <see cref="Indicators.CandlestickPatterns.TasukiGap"/> pattern indicator.
929  /// The indicator will be automatically updated on the given resolution.
930  /// </summary>
931  /// <param name="symbol">The symbol whose pattern we seek</param>
932  /// <param name="resolution">The resolution.</param>
933  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
934  /// <returns>The pattern indicator for the requested symbol.</returns>
935  public TasukiGap TasukiGap(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
936  {
937  var name = _algorithm.CreateIndicatorName(symbol, "TASUKIGAP", resolution);
938  var pattern = new TasukiGap(name);
939  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
940  return pattern;
941  }
942 
943  /// <summary>
944  /// Creates a new <see cref="Indicators.CandlestickPatterns.Thrusting"/> pattern indicator.
945  /// The indicator will be automatically updated on the given resolution.
946  /// </summary>
947  /// <param name="symbol">The symbol whose pattern we seek</param>
948  /// <param name="resolution">The resolution.</param>
949  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
950  /// <returns>The pattern indicator for the requested symbol.</returns>
951  public Thrusting Thrusting(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
952  {
953  var name = _algorithm.CreateIndicatorName(symbol, "THRUSTING", resolution);
954  var pattern = new Thrusting(name);
955  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
956  return pattern;
957  }
958 
959  /// <summary>
960  /// Creates a new <see cref="Indicators.CandlestickPatterns.Tristar"/> pattern indicator.
961  /// The indicator will be automatically updated on the given resolution.
962  /// </summary>
963  /// <param name="symbol">The symbol whose pattern we seek</param>
964  /// <param name="resolution">The resolution.</param>
965  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
966  /// <returns>The pattern indicator for the requested symbol.</returns>
967  public Tristar Tristar(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
968  {
969  var name = _algorithm.CreateIndicatorName(symbol, "TRISTAR", resolution);
970  var pattern = new Tristar(name);
971  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
972  return pattern;
973  }
974 
975  /// <summary>
976  /// Creates a new <see cref="Indicators.CandlestickPatterns.UniqueThreeRiver"/> pattern indicator.
977  /// The indicator will be automatically updated on the given resolution.
978  /// </summary>
979  /// <param name="symbol">The symbol whose pattern we seek</param>
980  /// <param name="resolution">The resolution.</param>
981  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
982  /// <returns>The pattern indicator for the requested symbol.</returns>
983  public UniqueThreeRiver UniqueThreeRiver(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
984  {
985  var name = _algorithm.CreateIndicatorName(symbol, "UNIQUETHREERIVER", resolution);
986  var pattern = new UniqueThreeRiver(name);
987  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
988  return pattern;
989  }
990 
991  /// <summary>
992  /// Creates a new <see cref="Indicators.CandlestickPatterns.UpsideGapTwoCrows"/> pattern indicator.
993  /// The indicator will be automatically updated on the given resolution.
994  /// </summary>
995  /// <param name="symbol">The symbol whose pattern we seek</param>
996  /// <param name="resolution">The resolution.</param>
997  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
998  /// <returns>The pattern indicator for the requested symbol.</returns>
999  public UpsideGapTwoCrows UpsideGapTwoCrows(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
1000  {
1001  var name = _algorithm.CreateIndicatorName(symbol, "UPSIDEGAPTWOCROWS", resolution);
1002  var pattern = new UpsideGapTwoCrows(name);
1003  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
1004  return pattern;
1005  }
1006 
1007  /// <summary>
1008  /// Creates a new <see cref="Indicators.CandlestickPatterns.UpDownGapThreeMethods"/> pattern indicator.
1009  /// The indicator will be automatically updated on the given resolution.
1010  /// </summary>
1011  /// <param name="symbol">The symbol whose pattern we seek</param>
1012  /// <param name="resolution">The resolution.</param>
1013  /// <param name="selector">Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar</param>
1014  /// <returns>The pattern indicator for the requested symbol.</returns>
1015  public UpDownGapThreeMethods UpDownGapThreeMethods(Symbol symbol, Resolution? resolution = null, Func<IBaseData, IBaseDataBar> selector = null)
1016  {
1017  var name = _algorithm.CreateIndicatorName(symbol, "UPDOWNGAPTHREEMETHODS", resolution);
1018  var pattern = new UpDownGapThreeMethods(name);
1019  _algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
1020  return pattern;
1021  }
1022  }
1023 }