The Profit Exit function fnBreakEven moves an open order's stoploss to the order's open price (break even).


When the profit of an open order reaches a defined value, the fnBreakEven  function moves the stoploss to order's open price value (break even).


The points parameter is used to define the number of points (or PIPs) of profit before moving the stoploss to break-even.

The points parameter is an integer value. For example, if points is 10, the order is moved to break-even when the trade has 10 points of profit.


After the fnAtrExit function has been added to a Drawing, it is configured by clicking the (+) button along the bottom of the Element.

The Function Configuration window allows you to select values for each parameter.



The following table provides information about each parameter of the fnAtrExit function.


Order Selection

Determines what orders of the Account are monitored.

  • All: all open orders on the account.
  • Symbol: only open orders matching the selected symbol.
  • Order Type: only open orders of the selected order type.
  • MagicNumber: only open orders with a matching magicnumber.
  • Exact Ticket: only open orders with the matching order ticket.

Note: Selecting Exact Ticket disables all other selection criteria.

points

Number of points, as an integer, of profit before the order is moved to break-even.