Closing Trades after a certain days

William Roeder  
  1. Hattori_Hanso: Anybody an idea how the loop could look like?

    Same as any position select loop. MT5: first select a position via CPositionInfo, directly, or by 'MT4Orders' library (2016)

    Show us your attempt (using the CODE button) and state the nature of your difficulty.
              No free help (2017)

  2. You also have to decide what you mean by 10 days. TimeCurrent() - OpenTime) > 10*PeriodSecond(PERIOD_D1) or 10 trading days iBarShift(s, PERIOD_D1, OpenTime) > 10.