Auto trading on MT4

 

Hi guys,

I'm new to all this, and was wondering if someone could help me understand how this works. I have installed MT4 and opened a demo account with a broker (AAAfx) a few weeks ago. I have done some trading with my demo account to get the gist of it. I was wondering if it is possible to run some sort of script on MT4 that executes trades on your behalf based on a set of rules that you define? I'm guessing this is what MQL language is all about, right? Are there scripts available for free download that I can try out to see how they work? Are these scripts "fire-and-forget" or do they need some kind of monitoring/intervention?

Thanks for your time!

Alex

 
norad:

Hi guys,

I'm new to all this, and was wondering if someone could help me understand how this works. I have installed MT4 and opened a demo account with a broker (AAAfx) a few weeks ago. I have done some trading with my demo account to get the gist of it. I was wondering if it is possible to run some sort of script on MT4 that executes trades on your behalf based on a set of rules that you define? I'm guessing this is what MQL language is all about, right? Are there scripts available for free download that I can try out to see how they work? Are these scripts "fire-and-forget" or do they need some kind of monitoring/intervention?

Thanks for your time!

Alex

I was wondering if it is possible to run some sort of script on MT4 that executes trades on your behalf based on a set of rules that you define?

Yes. thats what mql language is all about. Actually its roots lies in semi-automation like indicators manual traders use, or scripts which performs complex/routine calculations. The robot concept is relatively new and Imo there are still a huge majority of manual traders over ea traders.

Are there scripts available for free download that I can try out to see how they work?

Yes. the Code Base.

Are these scripts "fire-and-forget" or do they need some kind of monitoring/intervention?

Some are scripts designed for one_time use like close_all_orders. Some are expert_advisors designed as robot trades for you. Some experts or scripts are semi-automated by design. In general while expert/scripts could be designed as set-and-forget, this is seldom the case. Couple of reasons, experts are seldom profitable just by themselves, humans have a natural tendency to intervene.

You'll need to do allot of reading. There are links on the top of the forum like Articles, Books etc. Make good use of them.

 

Thats right

An Expert Advisor (EA) runs every 'tick' i.e. every time a new price comes in for that chart. They can buy and sell.

Indicators are the same, run every tick, but they can't buy and sell, they have 'buffers' which draw lines etc. on the chart.

A script is like an EA (it can buy and sell, and has no buffers), but only runs through once.

The basic structure is

init ---- this runs once when you load up

start ---- this runs every tick for EAs and indicators, or once for scripts

deinit ---- this runs once when you remove the EA or indicator, or when the script finishes

The BOOK link at the top will help you understand more

Reason: