# cksp#

API documentation for pandas_ta.trend.cksp Python function.

cksp(high, low, close, p=None, x=None, q=None, tvmode=None, offset=None, **kwargs)[source]#

Chande Kroll Stop (CKSP)

The Tushar Chande and Stanley Kroll in their book “The New Technical Trader”. It is a trend-following indicator, identifying your stop by calculating the average true range of the recent market volatility. The indicator defaults to the implementation found on tradingview but it provides the original book implementation as well, which differs by the default periods and moving average mode. While the trading view implementation uses the Welles Wilder moving average, the book uses a simple moving average.

Sources:

https://www.multicharts.com/discussion/viewtopic.php?t=48914 “The New Technical Trader”, Wikey 1st ed. ISBN 9780471597803, page 95

Calculation:
Default Inputs:

p=10, x=1, q=9, tvmode=True

ATR = Average True Range

LS0 = high.rolling(p).max() - x * ATR(length=p) LS = LS0.rolling(q).max()

SS0 = high.rolling(p).min() + x * ATR(length=p) SS = SS0.rolling(q).min()

Args:

close (pd.Series): Series of ‘close’s p (int): ATR and first stop period. Default: 10 in both modes x (float): ATR scalar. Default: 1 in TV mode, 3 otherwise q (int): Second stop period. Default: 9 in TV mode, 20 otherwise tvmode (bool): Trading View or book implementation mode. Default: True offset (int): How many periods to offset the result. Default: 0

Kwargs:

fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method

Returns:

pd.DataFrame: long and short columns.