running an EA on a chart without the indicators?

 

Can you run an EA without the included indicators on the chart?

 
pjay72 wrote >>

Can you run an EA without the included indicators on the chart?

The indicators should exist in the MT4 platform in all the relevant file locations. (So if you can see them in the options list they exist). They do not have to be on the chart where the EA is attached (provided they exist).

 
whocares wrote >>

The indicators should exist in the MT4 platform in all the relevant file locations. (So if you can see them in the options list they exist). They do not have to be on the chart where the EA is attached (provided they exist).

thanks for the reply wc. Now let me ask you another question. Can you have multiple buy/sell rules in an mt4 ea? for example

 
pjay72 wrote >>

thanks for the reply wc. Now let me ask you another question. Can you have multiple buy/sell rules in an mt4 ea? for example

if (a>b>c and d>20 or a>b<c and d>40) buy or something like that?

 
pjay72:

if (a>b>c and d>20 or a>b<c and d>40) buy or something like that?

yes, but that logic (a>b>c) is not allowed, you have to write it in another way (a>b and b>c)

evrything what trading needs is possible in mql4.

but some things are difficult to code, because mql4 is not as mighty regarding prebuild functions like php or perl

 
whocares:

The indicators should exist in the MT4 platform in all the relevant file locations. (So if you can see them in the options list they exist). They do not have to be on the chart where the EA is attached (provided they exist).

Hi WC,

Can you 'call' and indicator like one can do with an 'included' file from an EA and utilize it, or does it have to be attached to the chart in order for it to work on the chart that the EA is operating on to use it?

Thanks,

Doug

 
DougRH4x wrote >>

Hi WC,

Can you 'call' and indicator like one can do with an 'included' file from an EA and utilize it, or does it have to be attached to the chart in order for it to work on the chart that the EA is operating on to use it?

Thanks,

Doug

You can call the indicator using iCustom(.......);

It doesnt need to be attached to the chart as long as it is in the indicators folder.

 
DougRH4x wrote >>

Hi WC,

Can you 'call' and indicator like one can do with an 'included' file from an EA and utilize it, or does it have to be attached to the chart in order for it to work on the chart that the EA is operating on to use it?

Thanks,

Doug

Hi Doug

Do a simple test. Write e test ea to alert you when the RSI level is below 20 (say).

use something like this:

if (iRSI(NULL,0, etc) < 20) //complete this as per the IRSI function

{

Alert("RSI below 20");

}

Then stick it on a chart.

REMEMBER NOT TO add the RSI indicator to the chart. You can open another chart with the same currenty pair and timeframe and add the RSI to see what it is so you can see if the code works.

If you ger any Alerts but without the RSI indicator added to the chart you know that this is possible.

whocares

 
whocares wrote >>

Hi Doug

Do a simple test. Write e test ea to alert you when the RSI level is below 20 (say).

use something like this:

if (iRSI(NULL,0, etc) < 20) //complete this as per the IRSI function

{

Alert("RSI below 20");

}

Then stick it on a chart.

REMEMBER NOT TO add the RSI indicator to the chart. You can open another chart with the same currenty pair and timeframe and add the RSI to see what it is so you can see if the code works.

If you ger any Alerts but without the RSI indicator added to the chart you know that this is possible.

whocares

This method of doing a simple to test to verify how something works is a very good way of teaching yourself how to code. I do it all the time. If I have a question that I can not find an answer for on the forum or in the codebase / book / articles, I will try to do a simple test ea.

If after that I still do not knwo the answer to the question I will raise a question on the forum. Since the number of threads generated by me is 0, it shows that I have never failed to answer the question using this method. :-) In the process you manage to learn alot.

just my 2 bits worth. whocares

 
meikel wrote >>

yes, but that logic (a>b>c) is not allowed, you have to write it in another way (a>b and b>c)

evrything what trading needs is possible in mql4.

but some things are difficult to code, because mql4 is not as mighty regarding prebuild functions like php or perl

I was just thowing that out there. The focus is of my questions is to get ideas or examples of an ea with multiple trade execution rules.

 
pjay72 wrote >>

I was just thowing that out there. The focus is of my questions is to get ideas or examples of an ea with multiple trade execution rules.

While it is possible (and I have done it) to have multiple execution rules or multiple strategies operating out of the same ea, I have to go with what meikel said. It makes the ea complex and opens too many opportunities to introduce errors.

Just create more than 1 ea that complement each other. They can run independently on seperate charts (of the same currency pair if you want).

It is easier to code and easier to test and easier to debug and easier to upgrade or change or manage in the future.

whocares

Reason: