Exp_WeightOscillator - MetaTrader 5 Expert - MT4/MT5 Resources


Real author: Vladimir Hristov
The simplest EA is based on WeightOscillator . Sell when the oscillator crosses downward from overbought levels and buy when the oscillator crosses upward from oversold levels. When the bar closes, if there is a horizontal cross, a signal is formed.
The WeightOscillator_HTF indicator in the EA is only used for easier visualization of trends in the strategy tester, in other operating modes it is inactive.
Place the WeightOscillator.ex5 and WeightOscillator_HTF.ex5 compiled files into <terminal data folder>\MQL5\indicators .
After compilation, the Exp_WeightOscillator.ex5 expert file contains the WeightOscillator.ex5 and WeightOscillator_HTF.ex5 indicators as shown below in the resource , therefore, they do not need to be present in the terminal folder for the compiled EA to work! For this purpose, corresponding code has been added to the EA code in order to include these indicators in the EA's executable file.
Metrics executable has been added as a global scope resource
Change the string path to the indicator used as a resource in the OnInit() function block
Therefore, the executable compiled by experts can be used independently on other trading terminals without indicators.
Please note that the TradeAlgorithms.mqh library file allows trading Expert Advisors with non-zero spreads and the option to set Stop Loss and Take Profit along with opening positions with brokers that offer the following services. You can download more variants of this library via the following link: Trading Algorithms .
The input parameters of the default Expert Advisor were used in the test shown below. Stop Loss and Take Profit were not used during testing.

Figure 1. Example of trade on chart
2015 EURJPY H6 test results:

Figure 2. Test result chart
Attachment download
📎Exp_WeightOscillator.mq5 (21.22 KB)
📎 SmoothAlgorithms.mqh (130.2 KB)
📎 WeightOscillator.mq5 (23.62 KB)
📎 WeightOscillator_HTF.mq5 (22.29 KB)
Source: MQL5 #17076
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •