Welcome to the MQL4 course - page 4

 

thank very much for ur MQL4' lessen!

 
codersguru:
Hi folks!

With you Coders' Guru , your MQL4 trainer for the the next few months.

Welcome to the MQL4 course.

In this series, I will try to strip the mystique and confusion from MQL4 by giving you comprehensive tutorials with a straight forward example.

In this series of lessons, I will show you how to use the MQL4 for building your own Expert Advisors, Custom Indicators and Scripts.

...............

To read more please download my first lesson.

See u

Coders' Guru

Hi Guru,

Amazing course...thank you so much for your generosity.

What stifles me is the basic concept of what happens when an indicator or EA runs....what happens first...does it run for each bar...and does it rerun for each new finished bar ?

Also, how does one do 'tick at a time' data checks when using daily or hourly close/high/low prices ? (hope this makes sense).

Thanks again

Johns

 

help needed with crossover sample EA from lesson 14 part II

codersguru or other MT gurus, need some help with moving crossover sample EA from lesson 14 part 2

hi, I am confused about the EA how it closes open orders.

your code goes something like this:

for (cnt=0; cnt<total; cnt++) {

OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);

...

OrderClose(...);

...

}

please explain why it is safe to use such code? out of habit I normally code these things like:

for (int i=total-1;i>=0;i--) {

OrderSelect(i,...);

...

OrderClose(...);

...

}

but I am new to writing EAs so please explain why your code is correct. I mean, what am I missing? Thanks.

also, ps.. I think there is a typo in your part-2-lesson14.pdf... it says "sort EMA", should be "short EMA". I think it was in that pdf that I read this error.

 

Economic calendar EA

Codersguru,

Can you please have a look at my EA and tell or help me fix this problem. It places to much orders at a time. I think the looping is wrong but where? If added the orderscnt()<MaxTrades code but does not seem to work. Your experience will see the mistake is seconds. i want the EA to place only the requested amount of orders in a selected time. Currently the EA place trades as long as the code is true with in a spesific time.

Thank you very much,

Roets

Files:
 

Thanks for Paying It Forward

It's been said before, but I just stumbled across this thread after looking for a decent tutorial in writing this most "potentially profitable" of codes. Your work is fantastic, and we are grateful for your efforts!!!

 

Codersguru,

I'd just like to say thank you so much for this tutorial. It is clear and concise.

I also love your writing style! I can tell english is not your first language, but you are so very precise with your words that your grammar is different, not wrong.

 

tnx for ur effort

finished all ur lessons in 2 days & already finished my first EA.

good job!

 

Thank You!

I just ran into this and want to add my thanks to the chorus! Hope to have a chance to read part of this tonight. Much thanks to you!!!!!

 

Q. re FOR loop

codersguru:
Hi there,

Anyway these are all the lessons' links:

Loops & Decisions (Part1)

In the above, section "The increment expression", you say "you can use only one test expression" but you have

for (i=0,j=0;i<15,i<;i++,j++)

Isn't "i<" a second test expression? What does it mean anyway, or is it simply a typo error?

thanks

JRtrader

 

Help

Can Any one help me?

i want to protect my system,

How to set?...so my indicator can only works at IP 192.168.202.2

Thanks

Reason: