Maybe use the following declarations
string names[] = { "USD", "EUR", "JPY", "GBP", "CHF" };
double array[5];
void setArray(int index)
{
array[0] = USD[ index ];
array[1] = EUR[ index ];
array[2] = JPY[ index ];
array[3] = GBP[ index ];
array[4] = CHF[ index ];
}
[/PHP]
Then call setArray before the comment...
[PHP]setArray( 12 );
Comment( "Min: " + names[ ArrayMinimum( array ) ] + ": " + ArrayMinimum( array ) ...
![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
I have 5 Arrays....
USD[n],EUR[n],JPY[n],GBP[n],CHF[n];
Each is value is standardized to a value between 100 and -100
What i want to get is the Max and MIN value for [n] across all 5 arrays.
for example: n = 12
USD[12] = 95
EUR[12] = 80
JPY[12] = 25
GBP[12] = 12
CHF[12] = 20
How do I Get the max/min value and max/min array. . . in this case would be
Max: Currency = "USD", Value = 95;
Min : Currency = "GBP", Value = 12;
I figured out how to return the Max and min value but cannot figure out how to determine which array that value corresponds to.....
Thanks,
KK