Join our fan page
- Views:
- 5512
- Rating:
- Published:
- 2017.05.29 15:52
- Updated:
- 2023.03.29 13:47
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
Two colored filled rectangles with the display of channel levels. The rectangles are drawn between the values of two Keltner channels on one bar of any timeframe of the XMA_KLx5_Cloud indicator.
Indicator input parameters:
//+------------------------------------------------+ //| Indicator input parameters | //+------------------------------------------------+ input ENUM_TIMEFRAMES TimeFrame=PERIOD_H4; // Chart period input string Symbols_Sirname="XMA_Keltner_Pivot_"; // Name for the indicator labels input Smooth_Method XMA_Method=MODE_SMA_; // Method of averaging input uint XLength=100; // Depth of averaging input int XPhase=15; // First averaging parameter, 3//---- for JJMA within the range of -100 ... +100, it influences the quality of the transition process; //---- for VIDIA it is a CMO period, for AMA it is a slow average period input double Ratio1=1.0; // Deviation 1 input double Ratio2=3.0; // Deviation 2 input Applied_price_ IPC=PRICE_CLOSE_; // Price constant input color Up_Color=clrSkyBlue; // The color of the upper band input color Middle_Color=clrGray; // The color of the middle line input color Dn_Color=clrHotPink; // The color of the lower band input uint SignalBar=0; // Bar index to get the indicator values input uint SignalLen=40; // The length of the indicator bands //---- Colors of price labels input color Middle_color=clrBlue; input color Upper_color1=clrMediumSeaGreen; input color Lower_color1=clrRed; input color Upper_color2=clrDodgerBlue; input color Lower_color2=clrMagenta;
The indicator requires XMA_KLx5_Cloud.mq5 indicator file. Place it in <terminal_data_folder>\MQL5\Indicators.
Fig1. The XMA_Keltner_Pivot_HTF indicator
Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/18169

Two Keltner channels based on one moving average, drawn as a colored cloud, with the display of the last values as price labels.

Two colored filled rectangles with the display of channel levels. The rectangles are drawn between the values of two Bollinger channels on one bar of any timeframe of the XMA_BBx5_Cloud indicator.

The script finds on the chart all OBJ_TREND (trendline) objects and moves the line to the specified date with the specified price shift.

The indicator draws a color filled channel at a distance from the current price, which is equal to the current spread multiplied by ten.