Robot Optimization

Optimization of expert advisors will help me find the right parameters for different variables of the program in a period of time. It is better to use the 20 ema crossing the 200 ema or the 30 ema crossing the 193? all this kind of questions can be replied with the optimization process.

I will use control points instead of every tick so the process will be faster, we will use Expert Advisor 9 for optimization. I will run the optimizator with data of the current year, starting january 1 and ending july 31.

The 2 moving averages for the cross will be optimized, the take profits variable, the stop loss variable and the trailing stop will all be optimized as well. the mql build in optimizer will combine all this and display a report.

There is no need to use the same values for short and long trades, what it works good for long it don’t necessarily haves to work for short trades so i made 2 optimizations runs and here are the results:

Long Optimization Reports

Short Optimization Reports

It looks that the optimizer found great results for short trades, the draw down is of 20% and the expected payoff is high. This is what we look in an expert advisor, big payoffs and small drawdowns.

With this new optimized values:

StopLoss=250     TakeProfit=1850     Period_MA_1=9     Period_MA_2=171     Tral_Stop=750

i make a new expert advisor optimized for short sales, when i run it in the strategy tester using the most precise data now we get this curve from january 1st 2010 to today:

Details

Tags: , , , , , , ,

Emas cross 21 – 200 TP modification.

In prior versions of the emas cross robot we were using a 20 pips of stop loss and a 20 pips to take profits as well.

lets now make a new version changing the TP variable from 20 to 30, this way we risk 20 pips on each trade (same as we were doing before) but we increase our profit potential to 30.

as a disadvantage we have that in a certain trade the market can get the 20 pips but maybe can’t do it with the 30, so it will reverse and end with a loss. the only way to know it is testing the strategy.

here the results of the first 7 months of 2010:

Emas Cross 21 – 200 with a TP of 30 pips

As we can see this is the best operator we have until now working in a 24 hours environment in the euro dollar market.

Tags: , , , , , , ,

21 crossing 200 EMA 24 hours trading robot

the first robot trading the 21 with the 200 ema cross was successful trading in the US session. The obvious question is how the same program will perform trading 24 hours a day.

Emas Cross 21 – 200 Running 24 hours

2010 historical tests:

January 74.54
February 169.79
March 157.25
April -7.36
May 68.80
June 184.57

——————————–
578.79

Results are impressive, but there was a mont5h with losses (april), small ones but losses.  in this case the robot should run 24 hours a day as it makes more money than in the US session only.

Tags: , , , , ,

EMAs Cross Robotic Trading

This is an edge i was always trying to use when i was trading manually.  Without the discipline problems this robot will just execute a trade when the 21 EMA Cross the 200 EMA up or down side.
At the same time the EA opens a SL and a TP of 20 pips and it stays in the market until one of the 2 gets executed.

Emas Cross 21 – 200

Here is a nice image of what the robot can do in action, simple but effective:

Lets see how he can do it in the strategy tester, for the US session, euro-dollar market:

January 35.84
February 50.99
March 78.93
April 17.14
May 92.30
June 95.00

——————————
370.2

this is great, even if it doesn’t look as much earnings this program made profits every month, it never had a month with losses.
Risk seems small too i will have to learn how to calculate risk.
I will make some tweaks to this program, i will also test it 24 hours. i am seeing in the internet that there is the possibility to have dedicated windows hosting for mql to don’t rely on my own internet connection and local problems so the 24 hours trading is still a possibility.

I am glad to see some light at the end of the tunnel and have something that can really work, i think i am in the right path.

Tags: , , , , ,

11 – 31 Moving Averages Difference for Trend Development US Session Only

Same as Expert Advisor 1 but with the addition of a trade range, in the US session only. This is more realistic to develop at my home office, i don’t want to have computers turned on 24h for now.

Expert Advisor 2 – US Session Trading

As we can expect the program will make less trades in the euro-dollar market:

January -147.61
February -82.53
March -203.67
April -91.90
May 89.77
June 15.66

————————————
-420.28

It is clear that the robot can’t perform well in the US session only either, but this was expected so no problem. this EA was made mainly just to have a robot that can trade only while i am following it. each edge will have to be tested using 24 hours, american session, europe, tokyo, etc.


Tags: , , , , , ,

Auto trading the cable

I changed the automatic robot to run in the gbp-usd market instead of the euro so i can have the euro free for manual trades.  With the robot running, only one trade can be done in a given market at the same moment. So the robot will be trading the sterling while i will be able to still find strategies using my favorite market, the euro against the dollar.

Remember, the trades done by this first robot can be found here:  11 – 31 Moving Averages Difference for Trend Development info and operations

At 10:09 am EST the robot start running, at the same time criteria is found so the robot get in the market without hesitation:

The robot fails but criteria still there, the EA opens another trade:

This time the EA worked good and the trade is a winner, robot is in even now:

Another winner, EA is at +20 now:

Fails, EA at even now, 4 trades made for now in the US session, it is 11:58 am EST now:

Criteria was correct, EA won 20 again and it is at +20 now.
This time the robot don’t open a new trade as criteria ended, it is 2:04 pm EST now:

2:34 pm EST criteria is present again, EA makes a new trade:

robot fails but criteria still present for a new chance:

Fails again and criteria ends:

It is hard to know if this robot will work in the long term. Mql4 provides a feature to test the EAs using historial data,  lets do that to the robot before making any modifications to it.

Tags: , , , , , , , ,

First automatic trades in the euro

Here some images and info about how the robot works in real time trading.

Early in the US session the robot get in the market short side.

The market hit the stop loss, the trader is losing 20 right now. At the same time of the loss the robot open another trade as criteria is still there (ma 31 – ma 11 >= 18).

A new loss of 20 (stop loss) and a new entry as criteria still present:

Here is a program bug, i think that the robot should not wait until the stop loss is hitted to get out of the market, it haves to react if the criteria ends in the middle of the trade.
in the next image the robot exit the trade and don’t open a new one as criteria is not present anymore:

3 bad trades in a row made by the robot, lets test it tomorrow as it is.

Tags: , , ,

Robot iron discipline

I had read this in many books and articles, “if there is no pattern present the best is don’t trade” or “do you have what is needed to don’t trade?”, things like that are very common in the trader literature.

The thing is, that is of course a lot more easy to say than to really do.  Emotions control me during real trading session, the robot will always follow the pre established rules.

In a very quiet day like today the difference between the 2 moving averages was never 18 pips so the robot just did nothing in the hole American session.

I will be leaving the robot running overnight to see if he can catch some move, i will know tomorrow:

Tags: , , ,

First Auto trade

The first robot i will be testing is the one i call “11 – 31 Moving Averages Difference”, it is a very basic expert advisor for mql but i will help me to start to see how all this work.

Please check the trades i am making with this robot and the variables used in here:  http://fforex.me/robots/11-31-moving-averages-difference/

Let’s see how it works with some images, here the robot makes an entry in the short side.
Please note that at this time that the difference between the 11 and the 31 moving averages is equal or more than 18 pips. This gives the robot criteria to open a short order.
The robot simple obey and open the trade:

Here you can see the market trading very close to the TP line of 20 pips but without hitting it:

The market bounce up, robot was very close to profits but now we are facing losses. The robot idea is no intervention so i am just spectating totally outside:

SL is finally hitted, the trade ends with -20.90 pips.

Even with a loss, i learned a lot from this trade and i liked this EA. It was so close to profits that i am sure this robot can win sometimes, i like the criteria the robot haves and it is a great start to make bigger things.

Remember to check how the robot is doing here:

http://fforex.me/robots/11-31-moving-averages-difference/

Tags: , , , , , ,