What's new in the script:
It can run as a separate script or Expert Advbisor.
Depending on the TrailingStop variable, the script can trail positions using Fractals (stop levels are placed at the nearest fractal shifted by delta from them), extreme values of previous bars (e.g. for Buy they will be placed at Low-delta), Parabolic and Velocity indicators or at the specified number of points.
If TrailingStop = 4, the Parabolic indicator will be used to determine the stop level distance:
If TrailingStop = 4, the Velocity indicator will be used to determine the stop level distance:
Information about the current script operation is displayed on the screen:
In the screenshot, the trailing stop is set based on the portfolio profit levels and is calculated using fractals. Once the SL setting level (the lower price label) rises above the breakeven level (the upper price label), the script will start placing SL for all orders, regardless of whether they are currently profitable or not. If all these orders get closed by these stop levels, the total profit will still be positive.
The script shuts down after closing all orders.
The scripting can work without the Velocity indicator. You can use any other indicator measuring velocity (rate of price change).
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/9805
Retrieve a list of all Symbols/Instruments known to the Server with MarketInfo output to a CSV filePrice Distribution
Numeric representation of how many times each price occurred during a given period, Use on a 1 min chart, enter number of hours and minutes you want to look back. Useful in determining actual support and resistance levels.