Download MetaTrader 5

MQL4 first step

To add comments, please log in or register
Murray
55
Murray  

Salute folks,


A lot of reading has been going on and the tone is clear on doing the stuff yourself. I have never written a line of code in my life and desperately want to try and code my own basic EA.

I have tried to read through the manual and start losing the plot halfway down a page each time anyway, small problems (It's going to be a long journey clearly until I code a basic EA). Maybe some easy insight into the following questions could be attended to please?

1. Can you confirm that I can create an EA which will run on a currency pair and only send me an alert through the interface and via SMS/email etc. My research says it can as I'm not interested in automatically placing trades but only to send an alert / notification?

2. When coding the EA do I somehow need to "import the indicator into my EA completely from my template or do I somehow reference to the indicator when running through specific rules, as long as it is running in the template?

3. What should I read to understand how I obtain the output value of an indicator in my decision making process eg. The value of the ADX indicator is 49% for example?

4. I see it references Bid and Ask values but I want to know the actual currency pair price as is...is this called the OnTick?

5. When referencing to an indicator or coding the indicator output into my EA, do I have to have the mq4 file for the indicator or is the ex4 sufficient enough?


I'm probably pushing buttons, but before I try and go down the road of learning to code from scratch the above will help me better understand that my intent can be met by MQL4 EA.

Hope this makes sense.


Thanks kindly,


M

PomeGranate
579
PomeGranate  
MUZZLE_ZA:

1. Can you confirm that I can create an EA which will run on a currency pair and only send me an alert through the interface and via SMS/email etc. My research says it can as I'm not interested in automatically placing trades but only to send an alert / notification?

YES 

2. When coding the EA do I somehow need to "import the indicator into my EA completely from my template or do I somehow reference to the indicator when running through specific rules, as long as it is running in the template?

Depends, in most cases it is easier to 'reference' indicator values (see 3.)

3. What should I read to understand how I obtain the output value of an indicator in my decision making process eg. The value of the ADX indicator is 49% for example?

https://docs.mql4.com/indicators/icustom or documentation of any other of the built in indicators like iATR, iADX, etc.

4. I see it references Bid and Ask values but I want to know the actual currency pair price as is...is this called the OnTick?

NO - bid and ask are the relevant prices! OnTick is a special function.

5. When referencing to an indicator or coding the indicator output into my EA, do I have to have the mq4 file for the indicator or is the ex4 sufficient enough?

I can't tell for sure, but my guess is that you need a compiled mq4 file.
JD4
1101
JD4  
I believe Pome is correct on the last part, you need all of the compiled ex4 files for all of the stuff to work properly, the indicator(s) and the EA.  If you feel that trying to learn and code MQL4 is beyond your capabilities, there is another choice.  You could go to the Freelance section at the top of the page, and write up a request to have someone code it for you.  That will probably cost you some money though.  If it were me in that situation, I would figure out what it is I wanted done before posting a request.  The file the compiler works on is the MQL4 is the language file (like C++ or Java) and is readable to the programmer.  The ex4 is the executable compiled version.
Murray
55
Murray  

Folks,

I will continue my journey of understanding as it will only benefit me in the long run, having said this I want to thank you for your feedback as it gives me more comfort that my requirements are moving in the right direction.

I tried sourcing a developer on a freelance basis from Elance but 3 applications went no where and concerned that the freelancer would overshoot the cost estimate based on my requirement (wool over my eyes). So I want to understand more so that if I go down the freelance avenue I have a good idea of how long the work effort should take based on my comprehensive requirement/understanding.

Once again thank you for taking the time to provide feedback.

Cheers,

MUZZLE

Murray
55
Murray  

Morning folks,

Ok...So I tried the basic EA wizard template and then copied some basic alert code "function" I think it's called to bring up a basic alert in the MT4 interface.

I see that you can only have one EA running at a time on a chart, correct?

This brings me to my next question...

If I want to combine two EA's, where 1 references a M1 chart with ruleset1 and the other references an M5 chart with ruleset2 and I would like the combined ruleset result notification sent if everything (both EA's) is TRUE do I create an "external program" that looks at the two EA's and then let the external program notify me?


I hope this makes sense?


Tyvm,


MUZZLE

PomeGranate
579
PomeGranate  

Good Morning,

MUZZLE_ZA:

I see that you can only have one EA running at a time on a chart, correct?

Correct.

If I want to combine two EA's, where 1 references a M1 chart with ruleset1 and the other references an M5 chart with ruleset2 and I would like the combined ruleset result notification sent if everything (both EA's) is TRUE do I create an "external program" that looks at the two EA's and then let the external program notify me?  

Put it in one EA that checks for multiple timeframes, that should be a lot easier.

Murray
55
Murray  

Morning PomeGranate,

Thank you kindly for your insights and advice.

Ciao,

Muzzle

PomeGranate
579
PomeGranate  
You're welcome! :)
JD4
1101
JD4  
MUZZLE_ZA:

Folks,

I will continue my journey of understanding as it will only benefit me in the long run, having said this I want to thank you for your feedback as it gives me more comfort that my requirements are moving in the right direction.

I tried sourcing a developer on a freelance basis from Elance but 3 applications went no where and concerned that the freelancer would overshoot the cost estimate based on my requirement (wool over my eyes). So I want to understand more so that if I go down the freelance avenue I have a good idea of how long the work effort should take based on my comprehensive requirement/understanding.

Once again thank you for taking the time to provide feedback.

Cheers,

MUZZLE

While that issue is possible with some freelancers, at the other end is that the person asking for the coding to be done doesn't realize how difficult it might actually be, and that extra money in the cost is to cover the additional difficulty.  As you are saying here, it is fair to want to get as much as you can for your money spent, but it is also fair to expect the developers to ask for a fair amount of pay for the effort involved in what they do.  But there is something else to consider in this calculation of yours.  There might be something that you are unable to do, that they are, and you need to decide if that ability is worth the extra they are asking, even if you do not have an equivalent knowledge base to judge from.
Murray
55
Murray  

JD4,

Your points are absolutely valid. I have never had an issue with paying a good rate per hour for a competent developer, it's usually the total effort that can be a grey area vs the cost per hour.

Nevertheless I will take your advice if I get to a point where I need to extend my ability to deliver on my EA through 3rd party developers.

Let's see how I go and have a good weekend.

Ciao,

M

JD4
1101
JD4  
I wish you well on your education endeavors, and your trading.
1234
To add comments, please log in or register