If anyone is intested, I found the solution.
Just set filter0 as the main signal:
signal.General(filter0);
The EA will then use the m_stop_level and m_take_level of filter0 when placing orders.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I would like to create a descendant class of CExpertSignal. I plan to use make it callable by the EA wizard, as demonstrated here: https://www.mql5.com/en/articles/367.
An instance of this class will be added as a filter in the CExpertSignal generated. In addition to giving a buy or sell signal, this instance should also set the take profit and the stop loss of the trade.
The bit of the code where the main CExpertSignal instance (signal) and the instance of the descendant class (filter0) are created and where the latter instance is added as a filter is shown here:
How can I modify the stop level (m_stop_level) and the take level (m_take_level) of signal from within filter0 ?