MQL4 - Known Issues and Best Practices

 

Any value in doing this? Hopefully the contents of this thread can be distilled down to a series of 'must read links' and published as an Article either here or offsite?

If we try to keep the chatter down in this thread (maybe discuss the thread in another thread), stick to facts, and avoid hyperbole, and just add links to best practices or actual bugs (ie this is broken, rather than passionate feature requests).

Hopefully the links are direct to clear accessible posts rather than cryptic ones where the information is buried amongst other detail?

There is also a risk that links may change if MetaQuotes restructure the forums. But hopefully the content can be rescued via Google Cache, Way Back machine etc.. Will this work? Here's a starter for 10....

Known Issues (build 509)

This is an attempt to list known bugs by function, either due to the compiler or incorrect documentation.

Where possible ensure the Function name is at the start of the title:

Best Practices for writing EAs

Best practices for EA specific functionality.

General Coding Best Practices

Links to articles and forum discussions that encourage robust coding practices. After all, money is at stake here, literally ..

References and other resources



Link to this page

  • MQL4 - Known Issues and Best Practices
 
This is a great initiative. I think the best thing to do is to keep the first post with a maximum of such links, and use thread for discussion if needed. A moderator can always help you when you need to edit the first post.
 

I wonder why is a section like "knowledge base" is missing from the site. This is a very good idea.

The result is much clearer when discussing the same problems several times with scattered comments among the dozen linked other similar topics where the solution or explanation is.

 
updated :) - no more updated messages from me. Watch first post. I'll try to add everything then we can debate/par down the list as we go..
 

Great Initiative :)

  • Please check some of your links.
  • The [Price!=Price] takes me to [Loops and Closing or Deleting Orders].
  • And iCustom brings me back to this thread.
  • Perhaps its problem with my browser or site.

Again Good Job.

 
ubzen:

Great Initiative :)

  • Please check some of your links.
  • The [Price!=Price] takes me to [Loops and Closing or Deleting Orders].
  • And iCustom brings me back to this thread.
  • Perhaps its problem with my browser or site.

Again Good Job.


Thanks. Might have been my tidy up session!...
 
 
ydrol: Thanks. Might have been my tidy up session!...
Works for me now ... thx.
 
What about Pipnotic's build 509 issue that he noticed with the spread controller?
 

Aren't these two at odds with each other ? what is the correct advice ?

Rounding Lots and Prices

Working with doubles in MQL4

one advocates NormalizeDouble the other does not . . .

 

When "Working with" was written, there were no metals in metatrader. ALL pairs changed in a multiples of points. Ticksize was always equal to Point.

Now we have ticksize != Point and ticksize not a multiple of 10 (0.25)

Reason: