I have big
problems getting my two indicators together.
I made two custom
indicators, one is the Parabolic SAR, and the other is an averaging method, similar
to MA. The Parabolic SAR Indicator looks like this one:
I don’t have
much programming knowledge, so I am depending on the articles from mql5.
My plan is
to generate a Signal when both Indicators show in the same direction. But I don’t
know how to do that.
How do I
generate that Signal? I know that I need to create a class which is derived
from the CExpertSignal Class like in the following example:
But I just
don’t get the interaction between the indicators and the Signal. I didn’t find
an article which includes two indicators and a signal based on theses
the Signal have access to the Buffers made in the indicators? If not, where is the
place to define the conditions?
And if I
create the Signal finally, where do I write the code to make the Expert trade
Thank you very much in advance!
Hello, you only have to create a class if you want to create an automatically with MQL5 Wizard, is it well what you want ?
If yes then this article Create Your Own Trading Robot in 6 Steps! seems to me better, though it's also only for 1 indicator. You can also find a full reference for the Wizard in this topic : All about MQL5 Wizard : create robots without programming.
You can post the code of your attempt if you need help. Also you have to define precisely your signal condition, "both Indicators show in the same direction" isn't very clear to me.
Thank you for your quick answer! Yes, I want to let the Expert Advisor trade automatically for me, if that was your question. The Signal condition is: Buy if the ParSar is below the price of the analyzed bar AND the close price of the bar crosses the averaging indicator downwars. Close position when Parabolic Sar reverses.
I will try the articles which you proposed.