AIS TrailingStop Moral Expectation MT5
- Experts
- Aleksej Poljakov
- Version: 1.2
- Updated: 15 June 2022
- Activations: 5
The main purpose of this trading expert is to perform the functions of a trailing stop. It does not open or close positions, but only sets and moves take profit and stop loss levels. To calculate take profit and stop loss, the statistics of price movement and the moral expectation of D. Bernoulli are used. Due to this, the new levels set by the expert provide the best (of the possible) option in terms of risk/reward ratio. Let's look at the parameters of the trading robot.
- Tracked Symbols - currency pairs that will be tracked by the EA. Enter all the characters you are interested in separated by commas. For example: EURUSD,GBPUSD,USDCHF. If you leave this field empty, the adviser will work only on the symbol on which it is installed. When launched, the robot displays the monitored symbols in the "Experts" tab of the terminal.
- Estimated Timeframe - sets the timeframe on which the EA will collect price movement statistics. For trading strategies that use a large number of entries with little profit (scalping, etc.), you need to use small timeframes. For trending strategies, you need to choose larger timeframes. The general rule is that the larger this parameter, the longer the position will be held, and the higher the profit can be. But we must not forget about the increasing risks.
- Sensitivity - a parameter that sets the EA's sensitivity to price changes. With an increase in this parameter, the first stop loss set by the expert will be farther and farther away from the opening price. This can increase the profitability of trading, but also increase the time to hold a position open and the risks associated with it.
- Dynamic TakeProfit - when this parameter is enabled, the EA will monitor the current position take profits and move them to the optimal distance from the price, if necessary. Enabling this option can also increase the profitability of trading.
Let me remind you that the adviser itself does not open positions. Therefore, to get acquainted with the features of its work, parameters were added that are used only in the strategy tester. Testing occurs only on one character. All positions are opened randomly, after which the main algorithm of the trading expert comes into action - a trailing stop is launched. Parameters for the tester:
- MaxPosition - the maximum number of simultaneously open positions.
- TakeProfit - take profit for newly opened positions.
- Random - if the parameter is greater than zero, then positions are opened in the same order. May be useful when setting the Sensitivity.
Examples of how the Expert Advisor works in the tester (EURUSD, H1, 2021.01.01 - 2021.12.31, real ticks) are shown in the figures:
1 - default options
2 - Sensitivity = 5
3 - Estimated Timeframe = M5, Sensitivity = 5