• Overview
  • Reviews (1)
  • Comments (1)


The utility locks open positions opening trades in a counter-direction. Then it trails (not virtually) stop loss and take profit of all trades at a distance set by sl and tp parameters. If sl and tp parameters are not set, stop loss and take profit of all trades will be deleted.

Lock open positions before days off to avoid drawdown which may occur if market opens with a gap. Time of locking start is set by the time parameter as hh:mm (hh - hour, mm - minutes), and a day is set by the day parameter (5 - Friday, 4 - Thursday, ..., 1 - Monday). Stop loss and take profit orders are being trailed at the distance (sl±delta and tp±delta respectively) till the end of a trading day. Set the delta parameter to avoid frequent attempts to trading server.

  • sl - stop loss size (0 - remove the order; not 0 - trail);
  • tp - take profit size (similar to stop loss);
  • time - time to start locking, format - hh:mm;
  • day - day of locking;
  • delta - allowance for changing stop orders.
Francis Dogbe
2016.04.18 15:52 

nice work.