2 ?s regarding EAs

 

1. Is there a way to check if an expert actually works, meaning that it can open/close positions (trade). The thing is that it happened a lot to me that, like, I put an expert on a graph, see a smiley face, but the expert never trades. Is there a way to check if it works properly?

2. Also, I've heard that for some experts there are conditions that are to be meet for it to trade, like some currency pairs need to be opened, for instance. Is there a way to check those somewhere (= to check which conditions are there for an expert to trade/work properly)?

Thanks in advance for your answers,

Diam0nd

 

hi

Diam0nd:
1. Is there a way to check if an expert actually works, meaning that it can open/close positions (trade). The thing is that it happened a lot to me that, like, I put an expert on a graph, see a smiley face, but the expert never trades. Is there a way to check if it works properly?

2. Also, I've heard that for some experts there are conditions that are to be meet for it to trade, like some currency pairs need to be opened, for instance. Is there a way to check those somewhere (= to check which conditions are there for an expert to trade/work properly)?

Thanks in advance for your answers,

Diam0nd

You've to do backtesting first to see how often the EA will open position ..maybe your EA will take position every 1,2,3,4 hour....etc...based on timeframe you've attached your EA

Just wait and run your EA ....

==================

Forex Indicators Collection

 
prasxz:
You've to do backtesting first to see how often the EA will open position ..maybe your EA will take position every 1,2,3,4 hour....etc...based on timeframe you've attached your EA

Just wait and run your EA ....

==================

Forex Indicators Collection

First of all, thanks for your answer, but it does not really answers my questions (no offence).

I was not talking about any particular EA, I was talking about EAs in general. Could anyone please be so kind to answer my 2 questions?

 
Diam0nd:
First of all, thanks for your answer, but it does not really answers my questions (no offence). I was not talking about any particular EA, I was talking about EAs in general. Could anyone please be so kind to answer my 2 questions?

Hi Diam0nd,

lets see if i can also answer your first question and then the second .. prasxz has rightly answered your 1st question but well i'll try anyways.

(1) when you obtain or get an ea to make it work on mt4 there is really no way you would know if this particular ea will work even though it might show a smiley face but still it might not work .. wat you do to find out if it will ever open a position you check it in with MT4 backtesting to see if the ea is capable of trading or not it is like if it can open a position using history data it will open position with the present day provided all the conditions are met for the ea.. If you see the ea opening positions no matter when...

you know for sure this ea will trade this particular currency in future ( aside if developer of the ea only publishes a demo ea for some month).

(2) To know what are the conditions for the ea to trade you need to look inside the MQL4 file everything is written there to instruct it when to trade

hope this what you wanted to know

regards

EACAN

 
EACAN:
Hi Diam0nd,

lets see if i can also answer your first question and then the second .. prasxz has rightly answered your 1st question but well i'll try anyways.

(1) when you obtain or get an ea to make it work on mt4 there is really no way you would know if this particular ea will work even though it might show a smiley face but still it might not work .. wat you do to find out if it will ever open a position you check it in with MT4 backtesting to see if the ea is capable of trading or not it is like if it can open a position using history data it will open position with the present day provided all the conditions are met for the ea.. If you see the ea opening positions no matter when...

you know for sure this ea will trade this particular currency in future ( aside if developer of the ea only publishes a demo ea for some month).

(2) To know what are the conditions for the ea to trade you need to look inside the MQL4 file everything is written there to instruct it when to trade

hope this what you wanted to know

regards

EACAN

Thank you for the answers, first off. So, to check if an EA works at all I need to backtest it. That's clear enought.

As for the second question, are there are certain syntax in EAs code that can help one determine the conditions when an expert is allowed to trade?

Thanks in advance for your answers,

Diam0nd.

 
Diam0nd:
Thank you for the answers, first off. So, to check if an EA works at all I need to backtest it. That's clear enought.

As for the second question, are there are certain syntax in EAs code that can help one determine the conditions when an expert is allowed to trade?

Thanks in advance for your answers,

Diam0nd.

Hmm... Well, I wish this could be a simple answer, but it just isn't.

There are many different ways of writing code, so it could be any number of things to look for.

IN GENERAL!

If you find all of the "OrderSend" functions, there will probably be SOME kind of IF statement near them that is looking for certain things to be true. Usually this is a series of checks like (MyVariable == Something). That will at least tell you what variables it is waiting for to make an order. Note that

if ( (MyVariable == Something) && (MyOtherVar == OtherStuff) )[/code]

means that BOTH things must be true and

[code]if ( (MyVariable == Something) || (MyOtherVar == OtherStuff) )

means that either one must be true. These can be chained together and be quite confusing. But, && means "AND" and || means "OR".

Next you have to see what those variables represent. Look for each instance of MyVariable and see which ones do something like:

MyVariable = SomethingElse

Notice this time there was only 1 "=" sign. One "=" sign means that the variable is being set to something, where as "==" means that it is being CHECKED against something.

As I said, this is just a general process to figure this stuff out. If you don't code, it may be near impossible for you to find out. Best bet would be to post the EA here and ask...

One other thing about the back testing option. If you use the Visual Mode, after the test is through, it will show on the screen any indicators that it used in its internal calculations. That could help narrow it down for you a bit at least.

Good luck!

CS

 
cubesteak:
Hmm... Well, I wish this could be a simple answer, but it just isn't.

There are many different ways of writing code, so it could be any number of things to look for.

IN GENERAL!

If you find all of the "OrderSend" functions, there will probably be SOME kind of IF statement near them that is looking for certain things to be true. Usually this is a series of checks like (MyVariable == Something). That will at least tell you what variables it is waiting for to make an order. Note that

if ( (MyVariable == Something) && (MyOtherVar == OtherStuff) )[/code]

means that BOTH things must be true and

[code]if ( (MyVariable == Something) || (MyOtherVar == OtherStuff) )

means that either one must be true. These can be chained together and be quite confusing. But, && means "AND" and || means "OR".

Next you have to see what those variables represent. Look for each instance of MyVariable and see which ones do something like:

MyVariable = SomethingElse

Notice this time there was only 1 "=" sign. One "=" sign means that the variable is being set to something, where as "==" means that it is being CHECKED against something.

As I said, this is just a general process to figure this stuff out. If you don't code, it may be near impossible for you to find out. Best bet would be to post the EA here and ask...

One other thing about the back testing option. If you use the Visual Mode, after the test is through, it will show on the screen any indicators that it used in its internal calculations. That could help narrow it down for you a bit at least.

Good luck!

CS

Thanks so much for the asnswer

Under "conditions" for EAs to trade I meant currency pairs mostly, since this is the most common thing EAs author's require (= for an expert to be able to trade, one needs to have certain currency pairs active [chart windows opened]). So I will be looking for those I guess. Again, thanks a lot for your answer, it was pretty helpful.

Best regards,

Diam0nd.

 

I think what you are looking for is what pair the EA will trade on. If you attach "your EA" to a USDCHF TF=5M then that is the pair that the EA will trade, using the 5min time frame. If you want "your EA" to trade on another pair, or another time frame, then you have to open that chart, choose the correct time frame and attach "your EA" to it. There are a few exceptions to the time frame, and I don't think there is an EA that will trade pair "a" based on a chart from pair "b" (only one exception comes to mind, and that is in development).

Does that help??

Rusty

 
rusty105:
I think what you are looking for is what pair the EA will trade on. If you attach "your EA" to a USDCHF TF=5M then that is the pair that the EA will trade, using the 5min time frame. If you want "your EA" to trade on another pair, or another time frame, then you have to open that chart, choose the correct time frame and attach "your EA" to it. There are a few exceptions to the time frame, and I don't think there is an EA that will trade pair "a" based on a chart from pair "b" (only one exception comes to mind, and that is in development).

Does that help??

Rusty

Wow! That was a new way of saying: "You're a newb". LOL %)

Just kidding! Nah, seriosly, I am perfectly aware that one needs to attach an EA to a graph for it to simply work. However, a lot of EAs have conditions built-in in them to be able to trade. For instance, a certain number of currency pairs to be opened (example: I've recently seen an EA that required ALL currency pairs to be opened [meaning ALL chart windows of ALL pairs] in order for it to work/trade), or a certain time-period.

And essentially, my question is/was: are there any code patterns by which one could easily determine:

1. Does an EA has any certain conditions to be met for it to work?

2. If so, what are those conditions?

I hope that was clear enuogh. In any case, thanks a lot for your reply, Rusty

 
Diam0nd:
Thanks so much for the asnswer

Under "conditions" for EAs to trade I meant currency pairs mostly, since this is the most common thing EAs author's require (= for an expert to be able to trade, one needs to have certain currency pairs active [chart windows opened]). So I will be looking for those I guess. Again, thanks a lot for your answer, it was pretty helpful.

Best regards,

Diam0nd.

Hi Diam0nd,

hehe I hope I _am_ helping, and not just telling you stuff you know...

If I understand you correctly, then really all you would need to look for is something like:

if ((Symbol() == "EURUSD") || (Symbol() == "GBPUSD"))

There are some EA's that do filter by pair but I would have to say that these are highly in the minority. Most EA's don't consider what pair you are on at all, other than letting you change the settings of the EA to reflect the changes for TF and pair.

Also, not to give too simplistic an answer - but each EA will only trade on the pair who's chart it is attached to - UNLESS the EA logic specifically calls out to other pairs in its code. But, there are very few EA's that do that either.

One reason, is that it is deceptive to the user - why is it trading EURUSD when I put it on GBPUSD?? Sometimes EA's will pull information from what another pair is doing (ie, trying to figure an early move on a correlated pair), but in most cases it will only TRADE the pair that the EA actually running on.

A second reason is that an EA that use info from other pairs EA's can't be back tested properly - MT4's strategy tester has a "bug" that makes calling out to other pairs very unreliable for testing purposes.

Anyway, again, I hope that helps. If not, let me know, and I'll just be quiet.

hehehe

Best regards,

CS

Reason: