Skip to content

Upside/Downside Gap Three Methods

The Upside/Downside Gap Three Methods, a three-bar candlestick pattern, indicates trend continuation with the third candle closing the gap between the first two.

Method

tm.ta.cdlxsidegap3methods(source_open, source_high, source_low, source_close)

Inputs

ParameterArgument typeDescriptionDefault Value
source_openpd.SeriesOpen prices series-
source_highpd.SeriesHigh prices series-
source_lowpd.SeriesLow prices series-
source_closepd.SeriesClose prices series-

Outputs

OutputType
cdlxsidegap3methodsnp.ndarray

Example usage

strategy.py
import tradomate as tm
@tm.strategy()
def my_strategy(config: tm.TradomateConfig, data: tm.TradomateData):
# Trying out
cdlxsidegap3methods = tm.ta.cdlxsidegap3methods(data.open, data.high, data.low, data.close)
# Get the last value and print
last_value = cdlxsidegap3methods.iloc[-1]
tm.log(f"Last value of is {last_value}")
# Plot the values of cdlxsidegap3methods
tm.plot(cdlxsidegap3methods, title="", overlay=False)