Spreader 2 - MetaTrader 5 Expert | Forex Indicators Download - MT4/MT5 Resources


The author of the idea : Yuri Leshetov , the author of the mq5 code : Barabashkakon .
The EA calculates the opening direction and lot size. The calculation is optimized so that the EA can quickly accumulate positive spreads and end up with a profit, or if anything goes wrong, the EA will hold the trade until the drawdown recovers. Recessions happen and sometimes last for a long time. The EA does not use any indicators and performs calculations based on the last 60 historical records.
Currency pairs should have a long-term positive correlation. The Expert Advisor cannot check whether currency pairs are positively correlated.
Currency pairs must have the same quote currency. For example, you can use EURUSD and GBPUSD with the same USD quote currency, and GBPJPY and CHFJPY with the same Japanese Yen quote currency. EURUSD and USDJPY cannot be used together because they have different quote currencies, namely USD and JPY.
Do not start two different Expert Advisors at the same time if at least one of the currency pairs matches. There is no magic number for EA. However, if you use the EA correctly according to the instructions, there is no need for magic numbers as you can easily find the right pair for each EA trade.
The default settings allow the selection of up to six pairs, which I found suitable for testing on a demo account:
Note : Expert Advisors are not always on the market. Therefore, it can be run without opening a position for a long time.
The EA waits until the two related currency pairs rise in one area of 30 bars and then fall in the second area. If both areas move only upward or downward, the EA does nothing and only adds the "Trend found" annotation. If the currency pairs are separated, i.e. there is a negative correlation between the currency pairs, the EA will do nothing and add a "Negative Correlation" comment.
Once an upward and downward movement is found and two currency pairs are correlated with each other, optimization is performed, i.e. calculations are performed with the goal of profit in both areas, regardless of the direction of the trend (up or down). Optimization consists of selecting the best lot size for the second currency pair and deciding which currency pair should be the main currency pair and which currency pair should be used for hedging in the first area, i.e. selecting the currency pair for long and short positions. After that, positions on both currency pairs are opened based on the calculations. Once the profit reaches the specified value of the profit parameter, both positions are automatically closed and the EA repeats the algorithm.
One pair is considered a major currency pair and the other pair is considered a hedge against an uptrend. Take profits on major currency pairs and hedge against retracements. In a downtrend, currency pairs change roles. Hedging currency pairs reduces risk but reduces profits. But without hedging, the risk is not limited should the trend change.
Additional checks are added because the market sends out a lot of false signals, which can mislead any EA. If the check is negative, then EA thinks that it may suffer losses and thinks that the direction is wrong, so it writes the comment "False Testimony". Additional checks can limit drawdowns and reduce the likelihood of open positions.
Attachment download
📎 spreader_2.mq5 (23.4 KB)
Source: MQL5 #19402
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •