minValueIndex = ArrayMinimum( _OrderProfit ,0,0);
phy now I owe you a 1/2 dozen beers, works a treat. Cheers!
in ( _OrderProfit ,0 ,0) what do the 0's represent as I thought the last 0 was decimal point values?
Documentation is part of the editor
Select ArrayMinimum and hit F1 key
int ArrayMinimum( | double array[], int count=WHOLE_ARRAY, int start=0) |
Parameters:
array[] | - | The numeric array to search in. |
count | - | The amount of elements to search in. |
start | - | Initial search index. |
Sample:
double num_array[15]={4,1,6,3,9,4,1,6,3,9,4,1,6,3,9}; int minValueidx=ArrayMinimum(num_array); Print("Min value = ", num_array[minValueIdx]);
I was using the documentaion on this site and didn't know it was built into the editor. However I did use this information but interpreted it incorrectly.
Yes I am a rookie...

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
Array created to grab all details for open and pending orders. Can call up array to display order information on the chart via the Comments function. However ArrayMinimum refuses to grab the index for OrderProfit to display the single order with the greatest floating loss. Please have a look? Here is the code...
What I'm trying to achieve is to close the single open order with the highest floating loss when Max Orders are reached. All this done by calling the AllOrdersInit() funtion. Thanks!