• Overview
  • Reviews
  • Comments
  • What's new

Partial Close Lines

The "Partial Close Lines" EA is an assistant tool that manages partial order closure. As soon as the price crosses one of the Expert Advisor lines, a part of your open order will be closed. The user can also configure the EA so that it could only apply partial closure to the orders with a selected "magic" number, ticket number or comment.


How to use the EA

First of all, you need to select the type of partial closure for your order. The EA can partially close orders for base on the specified lot or percentage of your order's lot. You only need to press the button with "L", to switch to the mode of partial closure based on percent, or press on the button with "%" to switch back to the lot-based partial closure. Once you enter the desired value of percent or lot, press on "+". This will create a line on the chart. You should drag this line to the desired price level. The line needs to be activated so that the EA could work with it. This can be done by deselecting the line (click twice with your left mouse button on the line). As soon as the price touches the line, the EA will close a part of your order.

If you need to close an order with a required ticket number or comment, press on "S" button to open the menu of parameters. From there you can select one of four partial closure modes: "All Orders", "Ticket", "Magic", "Comment". In the "All Orders" mode, the EA will apply partial closure to all orders of the current trading symbol. In the "Ticket" mode, the EA will apply partial closure to an order with the specified ticket number. In the "Magic" mode, the EA will apply partial closure to orders with the specified magic number. In the "Comment" mode, the EA will apply partial closure to orders with the specified comment.


Settings

  • X_Axis_Offset - panel shift along X from the left side of the chart.
  • Y_Axis_Offset - panel shift along Y from the bottom of the chart.

Visual parameters of activated lines:

  • ActiveLineColor - the color of the activated line.
  • ctiveLineStyle - the style of the activated line. If the width of the line is greater than 1, the line style will be set as "Solid".
  • ActiveLineWidth - the width of the activated line.
  • ActiveLineLength - the length of the activated line. The line length is determined as the number of bars on the chart.
  • ActiveLineTextSize - the size of the task that is located near the activated line.

Other Parameters:

  • LineColor - the color of the inactive line.
  • LineWidth - the width of the inactive line.
  • PanelColorTheme - panel color scheme
  • MaxSlippagePoints - the maximum allowable slippage when closing an order in points. The function will be inactive on accounts with the Market Execution.
  • LinePresetColor# - the color for one sell of the color palette.
  • When an Order is Selected - when it is necessary for the EA to work with orders which have a specific magic number, ticket number or comment, instead of entering necessary information in the EA's settings, the user can simply select a particular order by clicking on the small box next to it. Then the EA will work only with those orders which have the same magic number, ticket number or comment as the selected one. The parameter has four options:
    • ShowAdditionalInfo - when an order is selected, the partial close lines will only display additional information (for example, how much money will be taken in the currency of your deposit when the price hits the line).
    • SelectOrderTicket - an order's ticket number will be copied. All subsequent partial close lines will only work with this order.
    • SelectOrderMagic - an order's magic number will be copied. All subsequent partial close lines will only work with orders which have the same magic number.
    • SelectOrderComment - an order's comment will be copied. All subsequent partial close lines will only work with orders which have the same comment.
Tip: If you accidentally activated the line with incorrect data, it is not necessary to remove it immediately. Simply change its parameters on the panel and double-click on an activated line to set the necessary data for this line.
No reviews
Version 1.2 - 2017.07.13
Added a new parameter "When an Order is Selected". When it is necessary for the EA to work with orders which have a certain magic number, a ticket number or a comment, then instead of entering the necessary information in the EA's settings, a user can simply select a particular order by clicking on the small box next to it. Then the EA will work only with those orders which have the same magic number, ticket number or comment as the selected one.

The parameter has four options:

-ShowAdditionalInfo - when an order is selected, the partial close lines will only display additional information (for example, how much money will be taken in the currency of your deposit when the price hits the line).
-SelectOrderTicket - an order's ticket number will be copied. All subsequent partial close lines will only work with this order.
-SelectOrderMagic - an order's magic number will be copied. All subsequent partial close lines will only work with orders which have the same magic number.
-SelectOrderComment - an order's comment will be copied. All subsequent partial close lines will only work with orders which have the same comment.
Version 1.1 - 2017.06.26
- Fixed minor bugs