zmalick:
You need to read more of the Book, in particular: Book - OrderSend
Hello all,
First post so please direct me to the right place if you need to. Im not sure if I need a script to do this but please let me know if I do (and provide solution if possible).
I am trying to create a simple mql4 program or script that will place trades based on the MA. There is an example in the book on using the MA to produce alerts but I need to understand what else needs to be added to place trades based on the MA. The code should buy if above the MA and sell if below the MA. The code for callindicator.mq4 is below:
What lines need to be added to this file (and where) to initiate the trades?
Thanks for your help I got this working.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello all,
First post so please direct me to the right place if you need to. Im not sure if I need a script to do this but please let me know if I do (and provide solution if possible).
I am trying to create a simple mql4 program or script that will place trades based on the MA. There is an example in the book on using the MA to produce alerts but I need to understand what else needs to be added to place trades based on the MA. The code should buy if above the MA and sell if below the MA. The code for callindicator.mq4 is below:
What lines need to be added to this file (and where) to initiate the trades?
Thanks in advance.