Code to Average all the Previous Pending Orders and add with certain TakeProfit??

 

i have taken many orders at a certain time, i need a code to generate the average for all those Pending Orders Price and modify all those orders with that average value with some TakeProfit added to it. i want to implement this in Expert Advisors??....someone please help me...!!!

Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Standard Constants, Enumerations and Structures / Trade Constants / Order Properties - Documentation on MQL5