Line Order Management FX
Line Order Management FX
Unpack the downloaded EA archive and locate its contents in experts subdirectory of MetaTrader 4 main
directory.
Configuration
use_timer
Synchronous mode (false): checking is done when the
tick comes.
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.
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".
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:
Please note:
- The number cannot be followed by any 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
By moving the "lvoe_tp_..." line, you can modify the take profit price level of a selected order.
Break Even
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
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
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.
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.
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.
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
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