Artificial Intelligence - MetaTrader 5 Expert - MQL5 #1104 - MT4/MT5 Resources

This Expert Advisor is rewritten from MQL4, the author is Leshetov , link to the source - https://www.mql5.com/ru/code/10289 .
We use the accelerated oscillator to get an indicator with 4 bar values from it: Shift, Shift+7, Shift+14, Shift+21. Each indicator value is multiplied by a weight calculated using the formula (100-x(n)), where x(n) - are the optimization variables x1, x2, x2, x3. After summing up the multiplied values and receiving the perceptron's exit value. If the exit value of the perceptron is above 0, a buy position is opened, if the value is below 0, a sell position is opened.
Open a position with stop loss (stop loss required) and no take profit. When the profit value reached by the position exceeds the stop loss value of the spread amount and an opposite signal occurs, the position is reversed by opening a position with a larger trading volume. If no opposite signal occurs, the stop loss is set to the same level as the open position (according to calculations, a trade is profitable in terms of the spread value).
If it is suddenly impossible to open a position and it is reversed due to the stop loss closing value, the position will be closed and opening will be attempted again on the next price move.
Stop loss is necessary because only when the position becomes profitable, the position can be closed and the stop loss can be moved. If the position becomes unprofitable, there must be the possibility of exiting it.
The chart shows the results of the work of the Expert Advisor with the default settings of last year's EURUSD M15.

Attachment download
📎artificialintelligence.mq5 (11.98 KB)
Source: MQL5 #1104
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •