Trailing Stop Universal
Trailing Stop Universal provides the maximally flexible and convenient operation of trailing stop. The product includes a general list of settings, which allow configuring trailing based on various indicators, including ZigZag, Average True Range, Moving Average, Ichimoku, Parabolic SAR, Bollinger Bands, Envelopes, Fractals, Alligator. Each indicator is configured separately.
The tool also allows trailing positions based on reference prices of a selected candlestick: High, Low, Open, Close.
Classical trailing stop with a fixed distance is also possible. Trailing can start immediately or after a position makes the specified number of profit points. You can set the trailing step allowing to move the position to breakeven.
Due to the large number of parameters, the utility provides very flexible work with trailing while maximizing the profit on long trends, and protecting it from price reversal.
You can enable trailing using any indicator separately or several indicators at once, in this case trailing will be performed based on the indicator, which is closest to the market price.
The tool can move the stop loss on all instruments or on the selected one. The Magic parameter enables operation together with other Expert Advisors, allowing the utility to manage their stop levels.
When you run it in the strategy tester, demonstration mode is activated. In this mode, alternately buy and sell trades are generated to allow you to get acquainted with the work of each trailing option and choose the most suitable one, as well as choose optimal settings.
A complete list of parameters is available in the blog.
The EA does not trade on its own, it only provides a trailing stop of open trades. Trades are only opened in the strategy tester for demonstration purposes and to allow you choose optimal parameters.
Main input parameters
- Magic - magic number: 0 - trailing of all trades, 1>= - trailing of trades with the specified Magic;
- Stop Level - stop loss level;
- Slippage - allowable slippage
- Testing SL - stop loss of trades in the tester;
- Testing TP - take profit of trades in the tester;
- INDICATOR SETTINGS
- Use Indicator Trailing - use of trailing based in indicator;
- Indicator Timeframe;
- Indicator Period;
- Indicator Buy Line - trailing for buy deals;
- Indicator Sell Line - trailing for sell deals;
- Indicator Deviation;
- Indicator Type - indicator calculation method;
- Indicator Applied Price - price used for calculation;
- Indicator Shift;
- Bars Timeframe ;
- Bars Number;
- Bars Buy Trailing Control Point - the control price of a bar to trail buy deals;
- Bars Sell Trailing Control Point - the control price of a bar to trail sell deals;
- Pips To Start Trailing - number of profit points to activate trailing;
- Trailing Distance - trailing distance;
- Trailing Step - trailing step;
- Indicator Symbol- CurrentSymbol, AllSymbols.
Code optimization. To select a timeframe, a method for calculating the moving average and the applied price, standard enumerations are now used.