Discussion of article "Library for easy and quick development of MetaTrader programs (part VIII): Order and position modification events"

To add comments, please log in or register
MetaQuotes Software Corp.
Moderator
208933
MetaQuotes Software Corp.  

New article Library for easy and quick development of MetaTrader programs (part VIII): Order and position modification events has been published:

In the previous articles, we started creating a large cross-platform library simplifying the development of programs for MetaTrader 5 and MetaTrader 4 platforms. In the seventh part, we added tracking StopLimit orders activation and prepared the functionality for tracking other events involving orders and positions. In this article, we will develop the class for tracking order and position modification events.

Let's compile the EA.
Set StopLoss in points and TaleProfit in points values to zero to open positions and place pending orders without stop levels. Set StopLoss for modification (points) and TakeProfit for modification (points) to 20 and 60 accordingly (the default values) — these StopLoss and TakeProfit levels are to be set by pressing the buttons.
Launch the EA in the tester and set pending orders. Then press the buttons for setting StopLoss and TakeProfit one after another. The levels are set and the appropriate entries appear in the journal. Next, enable trailing and observe the orders as they follow the price and the appropriate entries appear in the journal. Positions triggered by orders have their StopLoss levels trailed, and the appropriate entries appear in the journal.

Netting:


Hedging:

Author: Artyom Trishkin

To add comments, please log in or register