0% found this document useful (0 votes)
32 views8 pages

Line Order Management FX

This document provides instructions for configuring and using an expert advisor (EA). It describes the various configuration variables that control the EA's operation, including settings for asynchronous/synchronous mode, stop loss, take profit, break even, cancel level, and close part functionality. It also explains how to modify order levels by moving the lines drawn on a chart by the EA.

Uploaded by

tawhid anam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views8 pages

Line Order Management FX

This document provides instructions for configuring and using an expert advisor (EA). It describes the various configuration variables that control the EA's operation, including settings for asynchronous/synchronous mode, stop loss, take profit, break even, cancel level, and close part functionality. It also explains how to modify order levels by moving the lines drawn on a chart by the EA.

Uploaded by

tawhid anam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Installation

Unpack the downloaded EA archive and locate its contents in experts subdirectory of MetaTrader 4 main
directory.

Configuration

The variables responsible for the operation of


the EA:

Specifies whether to operate in an asynchronous mode.

Asynchronous mode (true): EA checks every second if


any of the orders were edited.

use_timer
Synchronous mode (false): checking is done when the
tick comes.

Please note: when use_timer is set to true, editing of the


EA settings is not possible - you need to remove it and
apply to the chart again.

When it is set to true, once EA is removed, all lines that


delete_on_deinit
derive from it are removed from the chart.

Stop Loss
Size of a default stop loss. When it is set to zero and the stop loss level has not
default_sl_level
been set for the order, the line will not be drawn.

default_trailing_stop Size of default trailing stop.

sl_color stop loss line colour

sl_style stop loss line style

By moving the "lvoe_sl_ ..." line, you can modify stop loss price level of a selected order.

To activate trailing stop, select the "lvoe_sl_ ..." line for the order for which you want to "pull" stop loss,
right click the mouse and choose "Horizontal Line - properties".

In the description pane, you will find the entry:

#1234567 stop loss

To set trailing stop for this order to 20 pips, just type ts=20 at the end ts=20, so that the whole formula
is:

#1234567 stop loss ts=20

Please note:
- The number cannot be followed by any character.

- Similarly, do not enter a space before or after the = character.=.

- Editing an order by moving the line at a distance further than TS will not take any effect: EA will restore
the distance resulting from the TS setting.

- To remove trailing stop, just edit the description and remove the said ts=20 string. ts=20.

Take Profit

WSize of a default take profit. When it is set to zero and the take profit level has
default_tp_level
not been set for the order, the line will not be drawn

tp_color Take profit line colour

tp_style Take profit line style

By moving the "lvoe_tp_..." line, you can modify the take profit price level of a selected order.

Break Even

use_be Specifies whether to activate the break even function.

default_be_level Default break even level.

be_offset Break even shift.


be_color Break even line colour.

be_style Break even line style.

The break even functionality is activated by setting use_be to true and specifying a default level of
default_be_level. By moving the "lvoe_be_ ..." line, you can modify the break even price level of an
order. If the line is set and it is exceeded by the price, the order will be secured - stop loss will be shifted
so that the position does not bring any losses in case of return (EA sets stop loss at the be_offset
distance from the opening price of the order).

Cancel Level

use_cl Specifies whether to activate the cancel level function.

default_cl_level Default cancel level.

cl_color Cancel level line colour.

cl_style Cancel level line style.

The cancel level functionality is activated by setting use_cl and specifying a default cancel level. If the
"lvoe_cl_ ..." line is set and it gets exceeded by the price, the pending order will be cancelled.
Close Part

use_cp Specifies whether to activate the close part function.

If true: enter in cp_lots the number of lots which EA will close at the next levels
designated by cp_levels.
cp_size_or_percent
If false: enter in cp_lots the percentage of lots which will be cumulatively closed
at the next cp_level.

Consecutive default closing levels of some positions are calculated in pips from
cp_levels
the position opening level.

cp_lots The number (or percentage) of position lots which should be closed.

cp_color close part line colour.

cp_style Close part line style.

By moving the "lvoe_cp_ ..." line, you can modify the level which results in closing of the positions
designated by cp_lots when it is exceeded. cp_lots.

Below you can find example scenarios of the default settings for the close part function:

Example 1.

We are opening a position for 6 lots with the set parameters:


cp_size_or_percent = true;

cp_levels = 20,30,40;

cp_lots = 3,2,100;

After making the profit of 20 pips, EA will close 3 lots and determine the level of the next closing at 10
pips (i.e. 30 from the opening of the position). After making the profit of 30 pips, the next 2 lots will be
closed and the closing level will again go 10 pips further. The last of the six lots will be closed at the level
of 40 pips from the opening price.

Example 2.

We are opening a position for 10 lots with the set parameters:

cp_size_or_percent = false;

cp_levels = 5,10,15,40,60,70,90;

cp_lots = 12.5,25,50,90;

After making the profit of 5 pips, EA will close 1.25 lots and determine the level of the next closing at 5
pips (i.e. 10 from the opening of the position). After making the profit of 10 pips, the next 1.25 lots will
be closed (i.e. 2.5 in total) and the closing level will again go 5 pips further. At the level of 15 pips from
the opening of the position, 2.5 lots will be closed (i.e. 50% from the beginning in total), while after
exceeding the level of 40 pips, only 10% of the initial position will be left. Further closing levels are
ignored since there are only four numbers in the cp_lots variable..

Please note

- The parameters cp_lots and cp_levels cannot contain any spaces or other characters between the
numbers, but only "," (comma) as a separator..

Open Level

ol_sell_color SELL pending orders line colour

ol_sell_style SELL pending orders line style

ol_buy_color BUY pending orders line colour

ol_buy_style BUY pending orders line style

By moving the "lvoe_ol_ ..." line, you can modify the opening price of a selected pending order.

Possible values of the "..._ style "parameter responsible for line style:
0 STYLE_SOLID

1 STYLE_DASH

2 STYLE_DOT

3 STYLE_DASHDOT

4 STYLE_DASHDOTDOT

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy