joshuaulrich / TTR

Technical analysis and other functions to construct technical trading rules with R
GNU General Public License v2.0
326 stars 102 forks source link

TTR Pattern Recognition functions?? #65

Open quantintell opened 6 years ago

quantintell commented 6 years ago

First thanks for providing TTR to R community for technical trading analysis and trading rules with R. TA-Lib is widely used by trading software requiring to perform technical analysis of financial market data open-source API for C/C++, Java, Perl, Python and .NET. TTR provides most TA-Lib indicators or functions, except the Pattern Recognition categories. Here are just a few pattern recognition functions TA-Lib provides to its users. CDL2CROWS Two Crows CDL3BLACKCROWS Three Black Crows CDL3INSIDE Three Inside Up/Down CDL3LINESTRIKE Three-Line Strike CDL3OUTSIDE Three Outside Up/Down CDL3STARSINSOUTH Three Stars In The South CDL3WHITESOLDIERS Three Advancing White Soldiers CDLABANDONEDBABY Abandoned Baby CDLADVANCEBLOCK Advance Block My questions are three

  1. I know currently TTR does not provide the Pattern Recognition categories in the package, Has TTR plan to have pattern recognition in the near future?

  2. Do you know any other R package provides this similar pattern recognition functions in R quantitate finance area?

  3. Or R have interface to TA-Lib C++, so we can use TA-Lib through R.

quantintell commented 5 years ago

R has a Package: candlesticks. This package deals with Candlestick Pattern Recognition. Description: Filter Japanese Candlestick Patterns like Doji, Engulfing, Harami, etc. out of OHLC price data. Author: Andreas Voellenklee Package is located at: URL: https://r-forge.r-project.org/projects/candlesticks/ Date/Publication: 2018-09-06 17:34:30 This R package is not in github or cran. I believe this package deal with Candlestick Pattern Recognition, similar TA-Lib’s Pattern Recognition.

quantintell commented 5 years ago

Here are list of functions listed in Candlestick Pattern Recognition

AboveTheStomach Above/Below The Stomach Candlestick Pattern addPriceInfo Add OHLC Information for detected candlestick patterns BelowTheStomach Above/Below The Stomach Candlestick Pattern BlendedCandles Calculate Open/High/Low/Close of N bars CandleBodyLength Candle (Body) Length CandleLength Candle (Body) Length candlesticks Functions for Candlestick Pattern Recognition CSPDarkCloudCover Dark Cloud Cover Candlestick Pattern CSPDoji Doji Candlestick Pattern CSPEngulfing Engulfing Candlestick Pattern CSPGap Gap Candlestick Pattern CSPHammer Hammer Candlestick Pattern CSPHarami Harami Candlestick Pattern CSPInsideDay Inside / Outside Day CSPInvertedHammer Inverted Hammer Candlestick Pattern CSPKicking Kicking Candlestick Pattern CSPLongCandle Long/Short Candlestick (Body) Pattern CSPLongCandleBody Long/Short Candlestick (Body) Pattern CSPMarubozu Marubozu Candlestick Pattern CSPNBlended Calculate Open/High/Low/Close of N bars CSPNHigherClose N consecutive higher/lower close prices CSPNLongBlackCandleBodies N consecutive long candles / bodies of same color CSPNLongBlackCandles N consecutive long candles / bodies of same color CSPNLongCandles N consecutive long candles / bodies of same color CSPNLongWhiteCandleBodies N consecutive long candles / bodies of same color CSPNLongWhiteCandles N consecutive long candles / bodies of same color CSPNLowerClose N consecutive higher/lower close prices CSPOutsideDay Inside / Outside Day CSPPiercingPattern Piercing Candlestick Pattern CSPShortCandle Long/Short Candlestick (Body) Pattern CSPShortCandleBody Long/Short Candlestick (Body) Pattern CSPStar Morning/Evening Star Candlestick Pattern CSPStomach Above/Below The Stomach Candlestick Pattern CSPTasukiGap Upside/Downside Tasuki Gap Candlestick Pattern CSPThreeBlackCrows Three Black Crows Candlestick Pattern CSPThreeInside Three Inside Up/Down Candlestick Pattern CSPThreeMethods Rising/Falling Three Methods Candlestick Pattern CSPThreeOutside Three Outside Up/Down Candlestick Pattern CSPThreeWhiteSoldiers Three White Soldiers Candlestick Pattern DarkCloudCover Dark Cloud Cover Candlestick Pattern Doji Doji Candlestick Pattern DonchianChannel2 Donchian Channel DownsideTasukiGap Upside/Downside Tasuki Gap Candlestick Pattern Engulfing Engulfing Candlestick Pattern EveningStar Morning/Evening Star Candlestick Pattern FallingThreeMethods Rising/Falling Three Methods Candlestick Pattern FallingWindow Gap Candlestick Pattern Gap Gap Candlestick Pattern Hammer Hammer Candlestick Pattern Harami Harami Candlestick Pattern HLC_Average Mean value of OHLC prices HL_Average Mean value of OHLC prices InvertedHammer Inverted Hammer Candlestick Pattern is.HL Check for Open/Close High/Low Data is.OC Check for Open/Close High/Low Data Kicking Kicking Candlestick Pattern LagOC Lag a Open/Close Time Series LagOHLC Lag a OHLC Time Series LongCandle Long/Short Candlestick (Body) Pattern LongCandleBody Long/Short Candlestick (Body) Pattern Marubozu Marubozu Candlestick Pattern MorningStar Morning/Evening Star Candlestick Pattern nextCandlePosition Position and color of the next candle in a OC price series OHLC_Average Mean value of OHLC prices PiercingPattern Piercing Candlestick Pattern RisingThreeMethods Rising/Falling Three Methods Candlestick Pattern RisingWindow Gap Candlestick Pattern ShortCandle Long/Short Candlestick (Body) Pattern ShortCandleBody Long/Short Candlestick (Body) Pattern Stomach Above/Below The Stomach Candlestick Pattern TasukiGap Upside/Downside Tasuki Gap Candlestick Pattern ThreeBlackCrows Three Black Crows Candlestick Pattern ThreeInsideDown Three Inside Up/Down Candlestick Pattern ThreeInsideUp Three Inside Up/Down Candlestick Pattern ThreeOutsideDown Three Outside Up/Down Candlestick Pattern ThreeOutsideUp Three Outside Up/Down Candlestick Pattern ThreeWhiteSoldiers Three White Soldiers Candlestick Pattern TrendDetectionChannel Current Trend Detection using Donchian Channel TrendDetectionSMA Current Trend Detection using Simple Moving Average UpsideTasukiGap Upside/Downside Tasuki Gap Candlestick Pattern

datafj commented 3 years ago

Hi @ccquantspeed , I found a more recent R package for Candle Stick Pattern. See: https://github.com/kochiuyu/CandleStickPattern/

quantintell commented 3 years ago

Hello @jflycn: Great find, hope everyone who is interesting at this area and R, can benefit from your finding.