Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
my code didn't help
Thank qjol:
This new code still show me all the 3 OrderOpenPrices as below:
2010.11.02 05:45:17 MyEa GBPJPY,M5: value = 0.00000
2010.11.02 05:45:17 MyEa GBPJPY,M5: array value = 129.23600
2010.11.02 05:45:17 MyEa GBPJPY,M5: array value = 129.20700
2010.11.02 05:45:17 MyEa GBPJPY,M5: array value = 129.20300
Thank you very much WHRoeder, It works well.
Thank qjol:
This new code still show me all the 3 OrderOpenPrices as below:
2010.11.02 05:45:17 MyEa GBPJPY,M5: value = 0.00000
2010.11.02 05:45:17 MyEa GBPJPY,M5: array value = 129.23600
2010.11.02 05:45:17 MyEa GBPJPY,M5: array value = 129.20700
2010.11.02 05:45:17 MyEa GBPJPY,M5: array value = 129.20300
May this code helps ;
double LowestBuyPrice()
{
double Price=0;
for(int order=0; order<=OrdersTotal()-1; order++)
if(OrderSelect(order,SELECT_BY_POS))
if(OrderType()==OP_BUY)
if(OrderSymbol()==Symbol())
if(Price==0)
Price=OrderOpenPrice();
else
if(Price!=0
&& MathMin(Price,OrderOpenPrice())==OrderOpenPrice())
Price=OrderOpenPrice();
else
if(Price!=0
&& MathMin(Price,OrderOpenPrice())==Price)
Price=Price;
return(Price);
}