A trend indicator drawn on the basis of the advanced Keltner channel.
Indicator input parameters:
//+-----------------------------------+ //| Indicator input parameters | //+-----------------------------------+ input Smooth_Method MA_Method1=MODE_SMA; // Averaging method input uint Length1=100; // Moving Average smoothing depth input int Phase1=15; // Moving averages parameter input Smooth_Method MA_Method2=MODE_JJMA; // Candlesticks size averaging method input uint Length2=20; // Averaging candlesticks depth input int Phase2=100;Â Â // The parameter of smoothing candlesticks size input double Deviation = 2.0; // Coefficient of channel expansion input uint Smooth=20; // Smoothing period input Applied_price_ IPC=PRICE_CLOSE; // Price constant input int UpLevel=+50; // Upper level input int DnLevel=-50; // Low level input int Shift=0; // Horizontal shift of the indicator in bars
The indicator uses SmoothAlgorithms.mqh library classes (must be copied to the terminal_data_folder\MQL5\Include). The use of the classes was thoroughly described in the article “Averaging price series for intermediate calculations without using additional buffers”.
.
Fig.1 The i-KlPrice indicator.