ENUM_SERIESMODE
Identifier | Description |
MODE_OPEN | Opening price |
MODE_LOW | Low price |
MODE_HIGH | High price |
MODE_CLOSE | |
MODE_VOLUME | Tick volume |
MODE_REAL_VOLUME | Real volume |
MODE_SPREAD | Spread |
ENUM_SERIESMODE
Identifier | Description |
MODE_OPEN | Opening price |
MODE_LOW | Low price |
MODE_HIGH | High price |
MODE_CLOSE | |
MODE_VOLUME | Tick volume |
MODE_REAL_VOLUME | Real volume |
MODE_SPREAD | Spread |
iHighest Returns the index of the highest value found on the corresponding chart (shift relative to the current bar). int iHighest( const string symbol, // Symbol ENUM_TIMEFRAMES timeframe, // Period ENUM_SERIESMODE type, // Timeseries identifier int count=WHOLE_ARRAY, // Number of elements int start=0 // Index );
HiBuffer[i]=iHigh(Symbol(),Period(),iHighest(Symbol(),Period(),?????,HiLoPeriod,i)); LoBuffer[i]=iLow(Symbol(),Period(),iLowest(Symbol(),Period(),?????,HiLoPeriod,i));
What is your question ?
double iBands( string symbol, // symbol int timeframe, // timeframe int period, // averaging period double deviation, // standard deviations int bands_shift, // bands shift int applied_price, // applied price int mode, // line index int shift // shift );
iBands(NULL,0,20,2,0,PRICE_LOW,MODE_LOWER,0)
Indicator line identifiers used in iBands(), iEnvelopes(), iEnvelopesOnArray(), iFractals() and iGator() indicators.
ID | Value | Description |
MODE_UPPER | 1 | Upper line |
MODE_LOWER | 2 | Lower line |

- docs.mql4.com
The main window shows Donchain Channels which plots highest price and lowest price for a given number of bars. I am trying to apply this concept to the BBW calculation which produces a percentage that is closer to a number of pips than the price. plotting the high and low for 6 to 12 months shows current volatility to past volatility. Apparently I have gone in the wrong direction in trying to apply iHighest and iLowest functions. I have reviewed dozens of variations of this indicator that applied MAs, regression, fibs and Bollinger Bands. Maybe this can not be plotted.
The main window has Donchian channels which illustrate what I would like to achieve. The first sub window is the indicator without modification. The blue lines were added to show what the modified indicator would look like. The second sub window is with the iHighest and iLowest functions

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
A thanks to Marco vd Heijden whose comments showed that I was going in the wrong direction.
I am trying to apply high and highest as well as low and lowest to a Bollinger Bandwidth indicator. I am new to MT4 programing. Code was copied from a BBW indicator. Then High(...Highest(...)) and Low(...Lowest(...)) was added from Donchian channels. This is where the programming stopped because the functions refer to price and not to indicator values. Code indentation is increased or decreased to show the added lines. The 2 problem lines are near the bottom with ????? where values should be placed.
Thank You for the help
Bob