Download MetaTrader 5

New article: Universal Expert Advisor — A Custom Trailing Stop (Part 6)

To add comments, please log in or register
MetaQuotes Software Corp.
MetaQuotes Software Corp. 2016.06.16 13:01 

New article Universal Expert Advisor: A Custom Trailing Stop (Part 6) has been published:

The sixth part of the article about the universal Expert Advisor describes the use of the trailing stop feature. The article will guide you through how to create a custom trailing stop module using unified rules, as well as how to add it to the trading engine so that it would automatically manage positions.

A Trailing Stop is a kind of algorithm, and its only task is to move a stop-loss order to a certain price level in order to protect a position from excessive loss. Trailing stop algorithms are external in relation to the trading engine. This means that their presence, as well as their absence in no way should affect the functionality of CStrategy. In addition, the trailing algorithms require the configuration of certain parameters. For example, for a classic trailing stop we need to specify the distance in pips between the reached extreme price values and the stop-loss level, which we want to be managed. Therefore, in addition to the algorithms themselves, we need to store their operation parameters somewhere.


Author: Vasiliy Sokolov

To add comments, please log in or register