Download MetaTrader 5

Combine indicators and multiple periods in EA: next steps

To add comments, please log in or register
Use MQL5 Cloud Network. Test robots at a super speed!
zeno
275
zeno 2013.05.06 20:42 

Hello,

I have multiple indicators and various periods that I take into account to enter and exit a trade. What are the steps to put them together in an EA so that when conditions are right I enter or exit a trade? Can I use an existing library or template where I point to my various indicators and time frames to be read? Do I create a separate class for every indicator in the EA to be read? I have all the data and just want to put it together.

Thank you for your help. 

Alain Verleyen
Moderator
30724
Alain Verleyen 2013.05.06 21:06  
zeno:

Hello,

I have multiple indicators and various periods that I take into account to enter and exit a trade. What are the steps to put them together in an EA so that when conditions are right I enter or exit a trade? Can I use an existing library or template where I point to my various indicators and time frames to be read? Do I create a separate class for every indicator in the EA to be read? I have all the data and just want to put it together.

Thank you for your help. 

There is the standard library, and eventually MQL5 Wizard. Otherwise you just have to put it together, your question is vague.
Documentation on MQL5: Standard Library
Documentation on MQL5: Standard Library
  • www.mql5.com
Standard Library - Documentation on MQL5
zeno
275
zeno 2013.05.06 21:39  
angevoyageur:
There is the standard library, and eventually MQL5 Wizard. Otherwise you just have to put it together, your question is vague.

Sorry, let me be more specific. Let's assume indicators A and B (e.g. ultra RSI and parabolic SAR) and possibly a 3rd one. They provide buy and sell signals, and if they both provide a signal (e.g. to buy) on the 1st bar closed within a certain time frame (e.g. within 10 minutes) of each other, on both the 5 and 15 minutes charts (as example), I put in a buy order (calculated on closed bar). In summary, if both indicators on 2 chart periods provide a buy signal within time frame (of 10 minutes), this is a confirmation to buy. I hope this example makes it clearer?

So I have those signals on these charts.  Indeed, the standard library among others refers to technical indicators (in general), but would it not be easier to refer to those signals that I have already set up? Also, I looked into managing multiple time frames as I describe in the line above, but did not see anything related to this combination (with multiple indicators). Did I oversee something?

Thank you. 

Rogerio Figurelli
Moderator
39555
Rogerio Figurelli 2013.05.06 23:28  
zeno:

Sorry, let me be more specific. Let's assume indicators A and B (e.g. ultra RSI and parabolic SAR) and possibly a 3rd one. They provide buy and sell signals, and if they both provide a signal (e.g. to buy) on the 1st bar closed within a certain time frame (e.g. within 10 minutes) of each other, on both the 5 and 15 minutes charts (as example), I put in a buy order (calculated on closed bar). In summary, if both indicators on 2 chart periods provide a buy signal within time frame (of 10 minutes), this is a confirmation to buy. I hope this example makes it clearer?

So I have those signals on these charts.  Indeed, the standard library among others refers to technical indicators (in general), but would it not be easier to refer to those signals that I have already set up? Also, I looked into managing multiple time frames as I describe in the line above, but did not see anything related to this combination (with multiple indicators). Did I oversee something?

Thank you. 

Hi zeno, it's very clear what you want, but note that there are several options and steps to put these indicators together in an EA, so that when conditions are right you will enter or exit a trade, like you need.

In other words, this options here are the algorithm you must code, like any other EA.

Maybe your doubt is how to code this algorithm (for instance using neural networks, state machines, etc.),so  please describe better what are you thinking about.

zeno
275
zeno 2013.05.07 00:00  
figurelli:

Hi zeno, it's very clear what you want, but note that there are several options and steps to put these indicators together in an EA, so that when conditions are right you will enter or exit a trade, like you need.

In other words, this options here are the algorithm you must code, like any other EA.

Maybe your doubt is how to code this algorithm (for instance using neural networks, state machines, etc.),so  please describe better what are you thinking about.

I thought to develop the algorithm in C++ since MQL5 is close to it. I can define every component (indicator/time frame) as a class or function in this design. I have not considered NN or state machine since I'm not familiar with them.
Rogerio Figurelli
Moderator
39555
Rogerio Figurelli 2013.05.07 02:02  
zeno:
I thought to develop the algorithm in C++ since MQL5 is close to it. I can define every component (indicator/time frame) as a class or function in this design. I have not considered NN or state machine since I'm not familiar with them.

So standard library and wizard, as suggested by Alain below, is the way.

Maybe research some free source code ideas (code base here)  can help you too.

Documentation on MQL5: Standard Library
Documentation on MQL5: Standard Library
  • www.mql5.com
Standard Library - Documentation on MQL5
To add comments, please log in or register