- Please edit your (original) post and use the CODE
button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - Perhaps you should read the manual.
The function returns an index of a found element taking into account the array serial. In case of failure it returns -1.
- Compute the maximum after you populate the entire array.
- Once you have the index, read the array[index] for the value.
I have found a separate discussion regarding this issue: https://www.mql5.com/en/forum/113103
![Reading indicator values from within an EA Reading indicator values from within an EA](https://c.mql5.com/36/34/reading-indicator-values-from-within.jpg)
Reading indicator values from within an EA
- 2008.12.05
- www.mql5.com
When writing an EA we often need the values of indicators to base our decisions on...
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi, I would like to display the value of an indicator instead of its index value. Here is the code that I have created. Somehow, it only display the index number. I would like to display the value of the index. For this code, I am using the Bulls Power indicator.
//highestValueForBulls
double highestBullsArray[50];
ArrayInitialize(highestBullsArray, 0);
for(int i = 0; i < highestBullsArrayElementsCount; i++)
{
highestBullsArray[i] = iBullsPower(_Symbol, _Period, ibullspowerperiod, PRICE_WEIGHTED, i);
highestValueForBulls = ArrayMaximum(highestBullsArray, WHOLE_ARRAY, 0);
}