The Expert Advisor doesn't generate the deals independently, but is a "helper" designed to control positions' state. This Expert Advisor is a kind of a simplified variation of the Expert Advisor described in the article about processing of the events, with the difference that the OnTradeTransaction() function is used and there is a processing of triggering of Stop Loss and Take Profit.
It should be considered that the Expert Advisor can send email in correct corresponding configurations. If sending mail to the terminal is prohibited, the Expert Advisor will output alerts. There are a few important moments:
Here are the results in the journal (output language parameter was changing at the same time):
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/1512
The indicator to determine the trend reversals on the basis of Bollinger BandsRAVI_FX_Fisher
The unnormalized oscillator using Fisher Transform
A semaphore signal indicator for the moments when the trend force measured by the deviation of the price from the Moving Average is higher than a fixed limitDivergence
The indicator displays the situation when the direction of price movement and technical indicators does not coincide