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
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);
}