Foreign exchange trading robot

MQ Language Editor

Anyone who uses the MT4 Foreign exchange trading platform for trading operations is not interested in EA trading, and I am no exception. I have collected a lot of MQL programming guides, MT4 operating instructions, etc. on the Internet, and I am ready to write my own EA trading program, trying to make a lot of money "very easily", but more than half a year has passed, and a lot of grammar has been memorized, and more than N routines have been loaded, but I still can't understand it. One day, angry! Push away those "secrets" and "treasures" …, and I will stop watching them! Start the experiment with the simplest functions and see how to do it. As a result, one day! It's really a day. I made my first "trading robot"! Although this "robot" basically has no performance, it is "extremely poor"! But what we share is the experience of learning-don't think too much, it is the right way to start operation, and learn by doing! Open the "MT4 trader" trading software on the computer; Two

"MQ Language Editor" button in the toolbar to enter the program editing tool;

Foreign exchange trading robot  第1张

After entering the editor, click the "New" icon;

Select "EA (template)" in the next interface, then give your own "robot" a name (I take "my-robot"), and then click "Finish" all the way.

At this point, you can see that a template program for EA transaction has been generated

Of course, if you press "F5" to compile at this time, this EA will also run, but it only shows that it is running, and nothing will happen! Now, I have no other requirements, just asking that this program can help me place an order!

Therefore, in the main function OnTick (), enter the following statement: int num; num=OrderSend(Symbol(),OP_BUY,0.01,Ask,3,0,0,"2001",0,0,Blue)


The completed function is to issue the bill unconditionally, and then display the order number in the upper left part of the market chart.

Recommended reading:

Class a futures company stock

Reprinted, please indicate the source
Exchange investment » Foreign exchange trading robot


欢迎 访客 发表评论

Forex Trading: A Beginner's Guide

Online investment Understanding Currencies