Source code for pyEX.studies.technicals.pattern

# *****************************************************************************
#
# Copyright (c) 2020, the pyEX authors.
#
# This file is part of the pyEX library, distributed under the terms of
# the Apache License 2.0.  The full license can be found in the LICENSE file.
#
import pandas as pd
import talib as t


[docs]def cdl2crows( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of Two crows for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDL2CROWS( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdl2crows": val, } )
[docs]def cdl3blackcrows( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of 3 black crows for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDL3BLACKCROWS( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdl3blackcrows": val, } )
[docs]def cdl3inside( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of 3 inside up/down for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDL3INSIDE( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdl3inside": val, } )
[docs]def cdl3linestrike( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of 3 line strike for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDL3LINESTRIKE( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdl3linestrike": val, } )
[docs]def cdl3outside( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of 3 outside for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDL3OUTSIDE( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdl3outside": val, } )
[docs]def cdl3starsinsouth( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of 3 stars in south for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDL3STARSINSOUTH( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdl3starsinsouth": val, } )
[docs]def cdl3whitesoldiers( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of 3 white soldiers for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDL3WHITESOLDIERS( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdl3whitesoldiers": val, } )
[docs]def cdlabandonedbaby( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of abandoned baby for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLABANDONEDBABY( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlabandonedbaby": val, } )
[docs]def cdladvanceblock( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of advance block for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLADVANCEBLOCK( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdladvanceblock": val, } )
[docs]def cdlbelthold( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of belt hold for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLBELTHOLD( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlbelthold": val, } )
[docs]def cdlbreakaway( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of breakaway for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLBREAKAWAY( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlbreakaway": val, } )
[docs]def cdlclosingmarubozu( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of closing maru bozu for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLCLOSINGMARUBOZU( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlclosingmarubozu": val, } )
[docs]def cdlconcealbabyswallow( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of conceal baby swallow for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLCONCEALBABYSWALL( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlconcealbabyswallow": val, } )
[docs]def cdlcounterattack( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of counterattack for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLCOUNTERATTACK( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlcounterattack": val, } )
[docs]def cdldarkcloudcover( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", penetration=0, ): """This will return a dataframe of dark cloud cover for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate penetration (int): penetration Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLDARKCLOUDCOVER( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), penetration, ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdldarkcloudcover": val, } )
[docs]def cdldoji( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of doji for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLDOJI( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdldoji": val, } )
[docs]def cdldojistar( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of doji star for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLDOJISTAR( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdldojistar": val, } )
[docs]def cdldragonflydoji( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of dragonfly doji for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLDRAGONFLYDOJI( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdldragonflydoji": val, } )
[docs]def cdlengulfing( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of engulfing for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLENGULFING( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlengulfing": val, } )
[docs]def cdleveningdojistar( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", penetration=0, ): """This will return a dataframe of evening doji star for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate penetration (int): penetration Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLEVENINGDOJISTAR( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), penetration, ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdleveningdojistar": val, } )
[docs]def cdleveningstar( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", penetration=0, ): """This will return a dataframe of evening star for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate penetration (int): penetration Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLEVENINGSTAR( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), penetration, ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdleveningstar": val, } )
[docs]def cdlgapsidesidewhite( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of up.down-gap side-by-side white lines for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLGAPSIDESIDEWHITE( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlgapsidesidewhite": val, } )
[docs]def cdlgravestonedoji( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of gravestone doji for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLGRAVESTONEDOJI( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlgravestonedoji": val, } )
[docs]def cdlhammer( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of hammer for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLHAMMER( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlhammer": val, } )
[docs]def cdlhangingman( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of hanging man for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLHANGINGMAN( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlhangingman": val, } )
[docs]def cdlharami( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of harami for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLHARAMI( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlharami": val, } )
[docs]def cdlharamicross( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of harami cross for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLHARAMICROSS( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlharamicross": val, } )
[docs]def cdlhighwave( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of high-wave candle for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLHIGHWAVE( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlhighwave": val, } )
[docs]def cdlhikkake( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of hikkake pattern for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLHIKKAKE( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlhikkake": val, } )
[docs]def cdlhikkakemod( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of modified hikkake pattern for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLHIKKAKEMOD( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlhikkakemod": val, } )
[docs]def cdlhomingpigeon( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of homing pigeon for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLHOMINGPIGEON( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlhomingpigeon": val, } )
[docs]def cdlidentical3crows( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of identical three crows for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLIDENTICAL3CROWS( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlidentical3crows": val, } )
[docs]def cdlinneck( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of in-neck pattern for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLINNECK( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlinneck": val, } )
[docs]def cdlinvertedhammer( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of inverted hammer for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLINVERTEDHAMMER( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlinvertedhammer": val, } )
[docs]def cdlkicking( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of kicking for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLKICKING( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlkicking": val, } )
[docs]def cdlkickingbylength( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of kicking bull/bear determing by the longer marubozu for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLKICKINGBYLENGTH( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlkickingbylength": val, } )
[docs]def cdlladderbottom( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of ladder bottom for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLLADDERBOTTOM( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlladderbottom": val, } )
[docs]def cdllongleggeddoji( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of long legged doji for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLLONGLEGGEDDOJI( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdllongleggeddoji": val, } )
[docs]def cdllongline( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of long line candle for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLLONGLINE( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdllongline": val, } )
[docs]def cdlmarubozu( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of marubozu for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLMARUBOZU( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlmarubozu": val, } )
[docs]def cdlmatchinglow( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of matching low for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLMATCHINGLOW( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlmatchinglow": val, } )
[docs]def cdlmathold( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", penetration=0, ): """This will return a dataframe of mat hold for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate penetration (int): penetration Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLMATHOLD( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), penetration, ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlmathold": val, } )
[docs]def cdlmorningdojistar( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", penetration=0, ): """This will return a dataframe of morning doji star for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate penetration (int): penetration Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLMORNINGDOJISTAR( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), penetration, ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlmorningdojistar": val, } )
[docs]def cdlmorningstar( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", penetration=0, ): """This will return a dataframe of morning star for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate penetration (int): penetration Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLMORNINGSTAR( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), penetration, ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlmorningstar": val, } )
[docs]def cdlonneck( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of on-neck pattern for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLONNECK( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlonneck": val, } )
[docs]def cdlpiercing( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of piercing pattern for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLPIERCING( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlpiercing": val, } )
[docs]def cdlrickshawman( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of rickshaw man for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLRICKSHAWMAN( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlrickshawman": val, } )
[docs]def cdlrisefall3methods( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of rising/falling three methods for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLRISEFALL3METHODS( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlrisefall3methods": val, } )
[docs]def cdlseparatinglines( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of separating lines for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLSEPARATINGLINES( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlseparatinglines": val, } )
[docs]def cdlshootingstar( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of shooting star for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLSHOOTINGSTAR( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlshootingstar": val, } )
[docs]def cdlshortline( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of short line candle for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLSHORTLINE( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlshortline": val, } )
[docs]def cdlspinningtop( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of spinning top for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLSPINNINGTOP( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlspinningtop": val, } )
[docs]def cdlstalledpattern( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of stalled pattern for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLSTALLEDPATTERN( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlstalledpattern": val, } )
[docs]def cdlsticksandwich( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of stick sandwich for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLSTICKSANDWICH( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlsticksandwich": val, } )
[docs]def cdltakuri( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of takuri dragonfly doji with very long lower shadow for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLTAKURI( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdltakuri": val, } )
[docs]def cdltasukigap( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of tasuki gap for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLTASUKIGAP( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdltasukigap": val, } )
[docs]def cdlthrusting( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of thrusting pattern for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLTHRUSTING( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlthrusting": val, } )
[docs]def cdltristar( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of tristar pattern for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLTRISTAR( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdltristar": val, } )
[docs]def cdlunique3river( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of unique 3 river for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLUNIQUE3RIVER( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlunique3river": val, } )
[docs]def cdlupsidegap2crows( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of upside gap two crows for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLUPSIDEGAP2CROWS( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlupsidegap2crows": val, } )
[docs]def cdlxsidegap3methods( client, symbol, range="6m", opencol="open", highcol="high", lowcol="low", closecol="close", ): """This will return a dataframe of upside/downside gap three methods for the given symbol across the given range Args: client (pyEX.Client): Client symbol (string): Ticker range (string): range to use, for pyEX.chart opencol (string): column to use to calculate highcol (string): column to use to calculate lowcol (string): column to use to calculate closecol (string): column to use to calculate Returns: DataFrame: result """ df = client.chartDF(symbol, range) val = t.CDLXSIDEGAP3METHODS( df[opencol].values.astype(float), df[highcol].values.astype(float), df[lowcol].values.astype(float), df[closecol].values.astype(float), ) return pd.DataFrame( { opencol: df[opencol].values, highcol: df[highcol].values, lowcol: df[lowcol].values, closecol: df[closecol].values, "cdlxsidegap3methods": val, } )