Global vars in EA - good? - page 2

 
ukt wrote >>

Thank you. All respect to you :o))

Partial right. Each data tick for the chart pair, EA start() is called.

Only start()

init() called when EA attached to chart or when chart environment alters eg, periodocity and also when recompile EA that attached to chart - have looksee at UninitializeReason()

maybe init() analogy is an .exe's 'once off' startup code (err, like the types I used to work with decades ago - lol)

data ticks are asynchronous regards clocktime - could be many or few milliseconds between, guess is function of FX trading...

maybe this helps?

not forget the mql4 book is good resource too!

guess I better re-read more often to refresh as obviously not 'with the program here'!

Which MQL4 book are you referring to?

What is despirately needed IMHO, is a book on programming EAs. Would love to work on that one with someone.

 

Plenty of info on site - just use the search form top right of all pages...

and - the book is full of ideas etc.

- really are many articles on this site, let alone the forum threads etc.

.

Sergey Kovalyov’s Book Is Now Downloadable!

'Sergey Kovalyov’s Book Is Now Downloadable!'

MetaQuotes Software Corp. announces placing a downloadable version of Sergey Kovalyov’s book Programming in Algorithmic Language MQL4 on the website of MQL4.community. The book is published in the Windows Help File (CHM) format, and it can be downloaded to be studied offline.

As its title suggests, the book is devoted to programming in MetaQuotes Language 4 (MQL4). The manual is written in a simple and clear language and intended for both novices and experienced traders. Once having studied the book, you will be able to start developing your own Expert Advisors, technical indicators, and scripts.

Sergey Kovalyov’s book has already been published on www.MQL4.com. Today we are publishing it as a separated file to be downloaded free of charge:

    * https://www.mql4.com/files/mql4bookenglish.chm (2 Mb, English)
    * https://www.mql4.com/files/mql4bookrussian.chm (2 Mb, Russian)

Participating in the author’s efforts to create this book, our company did their best to assist everybody with mastering of automated trading. We are highly interested in that the book turns out to be helpful for as many traders as possible. If you run your own website or blog, we would appreciate if you could place on it this book or a link to its downloadable version on our site.

URL-link code for downloading Sergey Kovalyov's Book from MQL4.community:

    * Sergey Kovalyov's Book on Programming in Algorithmic Language MQL4 (2 Mb)
    * C????? ???????, "???????????????? ?? ??????????????? ????? MQL4" (2 Mb)

Book Publication Terms and Conditions:

    * The rightholder of the book is MetaQuotes Software Corp.
    * The book is distributed free of charge.
    * The book cannot be modified under any circumstance when being published.
    * It is prohibited from extracting (decompiling) parts or texts of the book and publishing them on the internet, or other websites or even the press and media.


We highly appreciate placing on your website the book itself or a link to download it from our site.

.

Reason: