Here you can download a Metatrader 4 Expert Advisor Template which you can use to start to build your automated system. The template has a lot of tools, all of them works fine (I use it on live), you only have to add the rules for open an close position. I've written this Expert Advisor, some piece of the code are mine, others has been modified from open source EAs I've found on the net.

The template includes a ma croos example for open and close position, it just an example, please don´t use it with real money!!!

Download CyberEA-Template

Before starting


What are you going to programming?
Before you start to write the automated system you have to have a full and clear description of your system. Let take an example with a MA cross system:

Overview: signals for open and close position are going to be generated by a fast and low MA croos. If fast MA cross up slow MA open buy and close sell if there is some one.

This is easy but you are going to programming the rules so you have to take into consideration all variables:

- Type of MA? Simple, exponential, linear, ...

- Period?

- Apply price? The value are going to be calculated for close price of bar, open , high, low, middle, ...

- When the system are going to take action: a MA cross can happen in the current bar several times so maybe you want to wait to the current bar be completed.

- Are you going to use others indicators for confirmation?

- Which time frame are the system going to work?

All of this questions and others have to be answer before programming. Anyway you can set this variables as external variable for modify them later and try several configuration, so if this questions have no answer at the first moment they must be taken into consideration. If you download the CyberEA-Template you can see that all variables of the Fast and Slow MA are externals variables, so is easy change the configuration after compilation on the properties of the expert advisor.

0 coments: