Lessons on MQL

Learning MQL: Your first counselor in the Martingale

How to make the adviser on Martingale

Welcome, Lord merchants!

We continue our lessons on MQL4.And this time, we are with you write advisor who will work on the Martingale system (popularly such robots is called "monkeys").This will be a very simple skills that you will be able to serve as a basis for further research and development of its own "Holy Grail."


Homework Room 4

Using the knowledge you have acquired after this lesson, I ask you to finalize the adviser follows:

  • Add external parameter MaxOrders and modify Advisor so that he did not open orders overthan indicated in this variable.
  • Add Value MaxLoss, which will be responsible for the maximum loss in points for experts (required to take into account the volume).If this happens, close all open orders.

P.S. If you've just joined us begin by reviewing previous lessons:

  • Introducing MQL
  • cycles, functions and order in the EA.
  • Writing an adviser on the external display

Forum topic