which order's open price is the lowest one - page 2 12 New comment [Deleted] 2010.11.01 23:48 #11 qjol: 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 [WARNING CLOSED!] Any newbie Error 129 from open Any questions from newcomers [Deleted] 2010.11.02 03:54 #12 WHRoeder: Thank you very much WHRoeder, It works well. Mohamad Wafi Mohd Sidek 2019.01.28 10:49 #13 jian: 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); } 12 New comment
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);
}