//+------------------------------------------------------------------+ //| ScanPositions.mqh | //| Copyright 2021, Nkondog Anselme Venceslas | //| https://www.linkedin.com/in/nkondog | //+------------------------------------------------------------------+ #property copyright "Copyright 2021, Nkondog Anselme Venceslas" #property link "https://www.linkedin.com/in/nkondog" //Scan all positions to find the ones submitted by the EA //NOTE This function is defined as bool because we want to return true if it is successful and false if it fails void ScanPositions() { //Scan all the orders, retrieving some of the details gTotalPositions = PositionsTotal(); gTotalOrders = OrdersTotal(); gTotalBuyPositions = 0; gTotalBuyOrders = 0; for(int i=0; i