1.What is Keltner Channel?
Keltner Channel is a technical analysis indicator, widely used in various types of financial markets like the cryptocurrency industry to recognize potential buying and selling opportunities.
2.Keltner Channel
Indicator Introduction
2.1 Keltner Channel Indicators
The Keltner Channel consists of three lines (upper rail, middle rail and lower raill). The index is constructed by three parameters: the average period, the ATR period, and the ATR deviation multiplier. The moving average of the corresponding period serves as the middle rail, and the upper rail is formed by adding the ATR with deviation multiplier to the middle rail. The lower rail is formed by subtracting the ATR with deviation multiplier from the middle rail.
Center of gravity moving average oscillation index parameter
p1 = 50 #time period of the moving average
p2 = 10 #time period of ATR
p3 = 2.0 #the deviation multiplier of ATR
Image 1: Keltner Channel Indicator (the blue line in the pic)
2.2 CCI Trend Indicator
This indicator is a modified version of the traditional CCI indicator, incorporating a secondary comparison. It has two parameters: the CCI period and the ATR period (note that the ATR period here is different from the ATR period used in the Keltner Channel).
Principle of CCI Trend Indicator
1.When the current CCI is less than 0
The indicator calculation is as follows:
max(cci_filter[i-1], low[i] - atr[i])
2.When the current CCI is more than 0
The indicator calculation is as follows:
min(cci_filter[i-1], high[i] + atr[i])
Here, cci_filter[i-1] is the CCI trend indicator value of the previous moment, high[i] is the highest price of the current k line, and atr[i] is the ATR value of the current k line.
CCI Trend Indicator Parameters:
p1 = 32 # CCI period
p2 = 6 # ATR period
Image 2: CCI Trend Indicator (the yellow line in the pic)
3.Explanation of Keltner Channel Parameters
3.1. Opening Conditions
Conditions of Opening Long Positions:
1.Right Opening: When the price crosses below the lower rail of keltner channel, no positions will be opened. Instead, it will open a position only after the price crosses above the lower track of the Keltner Channel from below.
2.When the CCI trend indicator is in a horizontal state, that is: cci_trend[-2] = cci_trend[-1]
Conditions of Opening Short Positions:
1.Right Opening: When the price crosses above the upper rail of keltner channel, no positions will be opened. Instead, it will open a position only after the price crosses below the upper track of the Keltner Channel from above.
2.When the CCI trend indicator is in a horizontal state, that is: cci_trend[-2] = cci_trend[-1].
3.2. Closing Conditions
Conditions of Closing Long Positions:
1.When the price reaches the opposite boundary, i.e., when the price touches the upper rail of the Keltner Channel.
Conditions of Closing Short Positions:
2.When the price reaches the opposite boundary, i.e., when the price touches the lower rail of the Keltner Channel.
3.3. Parameters Configuration
Leverage: The leverage multiplier used by the user for investments, which is used to calculate order quantities
Total Investment Amount: The total amount of fund invested by the user, used entirely for margin
Automatic Stop-Loss Ratio: When the loss of the total investment amount reaches this ratio, the bot will execute an exit and close positions
MA Average Line: time period of average line
K-ATR: the ATR period used to construct keltener channel
ATR Multiplier: the ATR deviation multiple is used to construct the upper and lower rail of Kent sodium channel
CCC Period: time period of CCI
C-ATR Period: the ATR period used to construct CCI trend indicators
Period: Standard MA parameter. Required; options include 1 minute, 5 minutes, 15 minutes, 30 minutes, 1 hour, 4 hours, 8 hours, 1 day; 1 hour by default
Order Quantity: The number of orders being placed when a signal is triggered. Optional; empty by default
Futures Fee by Default: 0.00075
Inverse Futures Calculation:
s = (Margin ✖️ Lastest Price) / (2 ✖️ 0.00075 + (1/Leverage)) size = s / size per Futures
Forward Futures Calculation:
s = (Margin) / (2 ✖️ 0.00075 + (1/Leverage)) ✖️ Latest Price size = s / size per Futures
The actual order quantity will be the smaller value of the calculated value by default and the user-set value.
4.How to Create a Keltner Channel Bot?
Currently, Keltner Channel is only available for use on the Web.
Bots - Create a Bot - Futures - CTA - Keltner Channel - Backtest - Set Parameters - Create
Backtesting Process: Click the “Backtest” button, enter the expected parameters, and click “Backtest.” The system will automatically backtrack data (within one month by default) and generate a reference backtest record in the “Backtest Records.”
Gate reserves the final right to interpret the product.
For further assistance, please visit the Gate official support page or contact our customer support team.