/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
using System;
using QuantConnect.Data;
using QuantConnect.Data.Market;
using QuantConnect.Indicators.CandlestickPatterns;
namespace QuantConnect.Algorithm
{
///
/// Provides helpers for using candlestick patterns
///
public class CandlestickPatterns
{
private readonly QCAlgorithm _algorithm;
///
/// Initializes a new instance of the class
///
/// The algorithm instance
public CandlestickPatterns(QCAlgorithm algorithm)
{
_algorithm = algorithm;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public TwoCrows TwoCrows(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "TWOCROWS", resolution);
var pattern = new TwoCrows(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public ThreeBlackCrows ThreeBlackCrows(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "THREEBLACKCROWS", resolution);
var pattern = new ThreeBlackCrows(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public ThreeInside ThreeInside(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "THREEINSIDE", resolution);
var pattern = new ThreeInside(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public ThreeLineStrike ThreeLineStrike(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "THREELINESTRIKE", resolution);
var pattern = new ThreeLineStrike(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public ThreeOutside ThreeOutside(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "THREEOUTSIDE", resolution);
var pattern = new ThreeOutside(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public ThreeStarsInSouth ThreeStarsInSouth(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "THREESTARSINSOUTH", resolution);
var pattern = new ThreeStarsInSouth(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public ThreeWhiteSoldiers ThreeWhiteSoldiers(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "THREEWHITESOLDIERS", resolution);
var pattern = new ThreeWhiteSoldiers(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// Percentage of penetration of a candle within another candle
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public AbandonedBaby AbandonedBaby(Symbol symbol, decimal penetration = 0.3m, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "ABANDONEDBABY", resolution);
var pattern = new AbandonedBaby(name, penetration);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public AdvanceBlock AdvanceBlock(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "ADVANCEBLOCK", resolution);
var pattern = new AdvanceBlock(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public BeltHold BeltHold(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "BELTHOLD", resolution);
var pattern = new BeltHold(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public Breakaway Breakaway(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "BREAKAWAY", resolution);
var pattern = new Breakaway(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public ClosingMarubozu ClosingMarubozu(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "CLOSINGMARUBOZU", resolution);
var pattern = new ClosingMarubozu(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public ConcealedBabySwallow ConcealedBabySwallow(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "CONCEALEDBABYSWALLOW", resolution);
var pattern = new ConcealedBabySwallow(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public Counterattack Counterattack(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "COUNTERATTACK", resolution);
var pattern = new Counterattack(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// Percentage of penetration of a candle within another candle
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public DarkCloudCover DarkCloudCover(Symbol symbol, decimal penetration = 0.5m, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "DARKCLOUDCOVER", resolution);
var pattern = new DarkCloudCover(name, penetration);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public Doji Doji(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "DOJI", resolution);
var pattern = new Doji(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public DojiStar DojiStar(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "DOJISTAR", resolution);
var pattern = new DojiStar(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public DragonflyDoji DragonflyDoji(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "DRAGONFLYDOJI", resolution);
var pattern = new DragonflyDoji(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public Engulfing Engulfing(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "ENGULFING", resolution);
var pattern = new Engulfing(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// Percentage of penetration of a candle within another candle
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public EveningDojiStar EveningDojiStar(Symbol symbol, decimal penetration = 0.3m, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "EVENINGDOJISTAR", resolution);
var pattern = new EveningDojiStar(name, penetration);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// Percentage of penetration of a candle within another candle
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public EveningStar EveningStar(Symbol symbol, decimal penetration = 0.3m, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "EVENINGSTAR", resolution);
var pattern = new EveningStar(name, penetration);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public GapSideBySideWhite GapSideBySideWhite(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "GAPSIDEBYSIDEWHITE", resolution);
var pattern = new GapSideBySideWhite(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public GravestoneDoji GravestoneDoji(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "GRAVESTONEDOJI", resolution);
var pattern = new GravestoneDoji(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public Hammer Hammer(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "HAMMER", resolution);
var pattern = new Hammer(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public HangingMan HangingMan(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "HANGINGMAN", resolution);
var pattern = new HangingMan(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public Harami Harami(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "HARAMI", resolution);
var pattern = new Harami(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public HaramiCross HaramiCross(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "HARAMICROSS", resolution);
var pattern = new HaramiCross(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public HighWaveCandle HighWaveCandle(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "HIGHWAVECANDLE", resolution);
var pattern = new HighWaveCandle(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public Hikkake Hikkake(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "HIKKAKE", resolution);
var pattern = new Hikkake(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public HikkakeModified HikkakeModified(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "HIKKAKEMODIFIED", resolution);
var pattern = new HikkakeModified(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public HomingPigeon HomingPigeon(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "HOMINGPIGEON", resolution);
var pattern = new HomingPigeon(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public IdenticalThreeCrows IdenticalThreeCrows(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "IDENTICALTHREECROWS", resolution);
var pattern = new IdenticalThreeCrows(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public InNeck InNeck(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "INNECK", resolution);
var pattern = new InNeck(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public InvertedHammer InvertedHammer(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "INVERTEDHAMMER", resolution);
var pattern = new InvertedHammer(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public Kicking Kicking(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "KICKING", resolution);
var pattern = new Kicking(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public KickingByLength KickingByLength(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "KICKINGBYLENGTH", resolution);
var pattern = new KickingByLength(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public LadderBottom LadderBottom(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "LADDERBOTTOM", resolution);
var pattern = new LadderBottom(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public LongLeggedDoji LongLeggedDoji(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "LONGLEGGEDDOJI", resolution);
var pattern = new LongLeggedDoji(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public LongLineCandle LongLineCandle(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "LONGLINECANDLE", resolution);
var pattern = new LongLineCandle(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public Marubozu Marubozu(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "MARUBOZU", resolution);
var pattern = new Marubozu(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public MatchingLow MatchingLow(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "MATCHINGLOW", resolution);
var pattern = new MatchingLow(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// Percentage of penetration of a candle within another candle
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public MatHold MatHold(Symbol symbol, decimal penetration = 0.5m, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "MATHOLD", resolution);
var pattern = new MatHold(name, penetration);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// Percentage of penetration of a candle within another candle
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public MorningDojiStar MorningDojiStar(Symbol symbol, decimal penetration = 0.3m, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "MORNINGDOJISTAR", resolution);
var pattern = new MorningDojiStar(name, penetration);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// Percentage of penetration of a candle within another candle
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public MorningStar MorningStar(Symbol symbol, decimal penetration = 0.3m, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "MORNINGSTAR", resolution);
var pattern = new MorningStar(name, penetration);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public OnNeck OnNeck(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "ONNECK", resolution);
var pattern = new OnNeck(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public Piercing Piercing(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "PIERCING", resolution);
var pattern = new Piercing(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public RickshawMan RickshawMan(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "RICKSHAWMAN", resolution);
var pattern = new RickshawMan(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public RiseFallThreeMethods RiseFallThreeMethods(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "RISEFALLTHREEMETHODS", resolution);
var pattern = new RiseFallThreeMethods(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public SeparatingLines SeparatingLines(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "SEPARATINGLINES", resolution);
var pattern = new SeparatingLines(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public ShootingStar ShootingStar(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "SHOOTINGSTAR", resolution);
var pattern = new ShootingStar(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public ShortLineCandle ShortLineCandle(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "SHORTLINECANDLE", resolution);
var pattern = new ShortLineCandle(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public SpinningTop SpinningTop(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "SPINNINGTOP", resolution);
var pattern = new SpinningTop(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public StalledPattern StalledPattern(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "STALLEDPATTERN", resolution);
var pattern = new StalledPattern(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public StickSandwich StickSandwich(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "STICKSANDWICH", resolution);
var pattern = new StickSandwich(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public Takuri Takuri(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "TAKURI", resolution);
var pattern = new Takuri(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public TasukiGap TasukiGap(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "TASUKIGAP", resolution);
var pattern = new TasukiGap(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public Thrusting Thrusting(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "THRUSTING", resolution);
var pattern = new Thrusting(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public Tristar Tristar(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "TRISTAR", resolution);
var pattern = new Tristar(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public UniqueThreeRiver UniqueThreeRiver(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "UNIQUETHREERIVER", resolution);
var pattern = new UniqueThreeRiver(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public UpsideGapTwoCrows UpsideGapTwoCrows(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "UPSIDEGAPTWOCROWS", resolution);
var pattern = new UpsideGapTwoCrows(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
///
/// Creates a new pattern indicator.
/// The indicator will be automatically updated on the given resolution.
///
/// The symbol whose pattern we seek
/// The resolution.
/// Selects a value from the BaseData to send into the indicator, if null defaults to casting the input value to a TradeBar
/// The pattern indicator for the requested symbol.
public UpDownGapThreeMethods UpDownGapThreeMethods(Symbol symbol, Resolution? resolution = null, Func selector = null)
{
var name = _algorithm.CreateIndicatorName(symbol, "UPDOWNGAPTHREEMETHODS", resolution);
var pattern = new UpDownGapThreeMethods(name);
_algorithm.RegisterIndicator(symbol, pattern, resolution, selector);
return pattern;
}
}
}