Simple EA Based On BreakOut of EMA

 

Hi Community,

I am a forex newbye, I'm interested in autotrading. I'm posting my first ea to have your help to improve it.

I'm not a programmer and so a lot of code in the Ea is not mine. Sorry for that. I thank the people who have written this code very much.

But the code about the TS system is mine!

I explain the TS:

Time Frame: 1 hour (but probably good other TF like 4 hour)

EUR/USD (but probably good GPB/USD)

The idea is to find good trends with some strong signals of breakout of EMA, trying to avoid false signals as much as possible.

Main Breakout (for long, for short is the same but reversing!)

It is a price breakout (not a EMA crossover)

I look 4 bars: the first one is a bullish bar and close after EMA (23); other to bars (bullish ones) closed above EMA (23) and I take the signal when the last bar (0) open above EMA (23), too.

In order to filter some false signals I added 2 controls:

- a spread calculation with a fast EMA (8), to measure how strong is the breakout

- and I verify if the fast EMA is above the slow EMA for opening the long position (this is good for false breakout)

I close the position not with money management but with a less strong signal of the reverse breakout of slow EMA (23):

for closing is enough one bar closing above and un bar closing below.

I put here the EA and one backtest.

I've just made some optimization, but I can say that in a range of values it seems to be quite stable.

Thanks in advance for your help

Alessandro

Files:
testing.rar  10 kb