//+------------------------------------------------------------------+ double biggestlot() { double orderlots=0; for(int i=OrdersTotal()-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) { if(OrderLots()>orderlots) { orderlots=OrderLots(); } } } return (orderlots); } //+------------------------------------------------------------------+
Marco vd Heijden:
thanks
Marco vd Heijden:
how give a ticket number of biggest lot?
//+------------------------------------------------------------------+ double biggestlotticket() { double orderlots=0; int orderticket=0; for(int i=OrdersTotal()-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) { if(OrderLots()>orderlots) { orderlots=OrderLots(); orderticket=OrderTicket(); } } } return (orderticket); } //+------------------------------------------------------------------+
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 need help to select lot of postion and save in array to select biggest lot to martingle