Double EMA cross + ATR targets + BB filter

 

Someone can code it?

Given one BIG EMA cross and a SMALL EMA CROSS

The big cross will give us the trend.

FAST B.EMA x SLOW B. EMA

The small cross will give us the entry signal.

FAST S.EMA

FAST S.EMA

We get trades when the Small ones crosses after a cross of the Big EMAS.

There is some like this here in TSD, but some change is needed:

Take Profit = ATR X Multiplier (allow decimals for multiplier!)

Stop Loss = ATR X Multiplier (allow decimals for multiplier!)

FILTERS:

Bollinger Bands Filter = ATR X Multiplier (This is for avoid sideways makets). No trades if the distance of the bands is less than the ATR X multiplier

Optional RSI filter to avoid oversold/overbought entries example: no long if RSI > 80 and no short if RSI < 20

Optional Price Filter: Only entry long when the entry signal is higher than the last one and Lower for short entries.

Optional: Add positions, to allow entry new trades before the end of the last one not closed yet.

Important: Entry only when the bar closes, not during the bar formation.

The EA must work with 5-digit brokers.

Example of intial values to EURJPY:

Big EMA cross = 5 x 15

Small Ema cross = 1 x 2

Take profit 0.5 ATR - Spread

Stop Loss = 2 ATR + Spread

Time Frame H4

Results for jan~apr 2010 EURJPY H4:

month wons Losses Pips profit

jan/10 10 1 120

fev/10 12 1 160

mar/10 15 1 220

abr/10 11 0 220

The attached images shows a great sequence of profit trades.

Files:
 
nylon:

Given one BIG EMA cross and a SMALL EMA CROSS

What did you mean under big and small EMA crosses?

What their values you use? I can't see EMAs on your screenshot :-(

Also, what mean of small and big arrows?

nylon:

The small cross will give us the entry signal.

FAST S.EMA

FAST S.EMA

Did not understood. May be fast S.EMA x slow S.EMA?

nylon:

Example of intial values to EURJPY:

Big EMA cross = 5 x 15

Small Ema cross = 1 x 2

These are periods of EMAs?

Thanks. Strategy looks interesting. I'll try to code it...

 
Daniil:
What did you mean under big and small EMA crosses?

What their values you use? I can't see EMAs on your screenshot :-(

Also, what mean of small and big arrows?

Did not understood. May be fast S.EMA x slow S.EMA?

These are periods of EMAs?

Thanks. Strategy looks interesting. I'll try to code it...

Hi! Thanks for your interest!

Big and Small Ema Crosses is two pairs of Crosses... one pair (the small) is very fast, like 1 period EMA (the price itself) crossing the 2 or 3 period. This Small cross is the blue and red arrows in the chart.

Well take the blue and red arrows only when it is according with the LASTbig black arrows (this is a variation of the Black dog system!). The Black arrows is the BIG EMA crosses. I use 5 and 15 period or 1 and 34, manual test sucks!

Did not understood. May be fast S.EMA x slow S.EMA?

This is the cross of the two small EMAS.

 

FORGOT AN IMPORTANT DETAIL: i use a 96 period ATR. It gives me a average true rage of the last 4 days in the 4 hour chart.

The attached EA use some of this strategy.

Files:
 

The MQ4 file. This EA does not open positions when bar is closed. Its a loser.

Files:
 
nylon:
This EA does not open positions when bar is closed. .

I'm not sure about this... The thing seems to do this, but it closes the open positions when the big Ema's crosses.

The money management does not seem to work well... it's strange.

I'm not sure if it works with microlot.

 

I took off the part of the code that closed trades in the Big Crosses... now it just closes in the Take Profit and Stop Loss.

The money management must be set to -1 to work with Mini lots. Not possible to work with micro.

The Take Profit and Stop Loss must be 500 for 50 pip and 1000 for 100 pip...this for 5 digit brokers.

When I put the arrows in a chart and make manual backtest I got 10 winning trades for EURJPY in JAN/10 and one loss... but, in this robot, more arrows apear: 13 won and 5 loss. Take profit 400 Stop Loss 800. The results doesn't match... maybe something wrong with the arrows indi, but, anyway, the EA allows to make some optimization and find promising sets.

Attached the mod EA.

Files:
 

Expert

Hi, nylon!

I wrote an expert. Can you, please, verify it on your data. It is a draft version, so may be some bugs here

The result on 01/2010-04/2040 is not good. May be some errors in code?

Files:
 

My mistake! The closes in Big crosses still happening.

nylon:
I took off the part of the code that closed trades in the Big Crosses... now it just closes in the Take Profit and Stop Loss.

The money management must be set to -1 to work with Mini lots. Not possible to work with micro.

The Take Profit and Stop Loss must be 500 for 50 pip and 1000 for 100 pip...this for 5 digit brokers.

When I put the arrows in a chart and make manual backtest I got 10 winning trades for EURJPY in JAN/10 and one loss... but, in this robot, more arrows apear: 13 won and 5 loss. Take profit 400 Stop Loss 800. The results doesn't match... maybe something wrong with the arrows indi, but, anyway, the EA allows to make some optimization and find promising sets.

Attached the mod EA.
 

Ok, thank you! I'll try it!

Nilo.

Daniil:
Hi, nylon!

I wrote an expert. Can you, please, verify it on your data. It is a draft version, so may be some bugs here

The result on 01/2010-04/2040 is not good. May be some errors in code?
 

Daniil, I use 96 period to ATR... this way it is not affected for the low volume times, as it will show the ATR for the last 4 days.

My best results in manual backtests was with 1ATR for take profit and 2ATR for loss.

The EA is working well, but shows different results when compared to manual BT.

Manual BT was made from the attached indicator. Some way, the small MA crosses is different, and I think the problem is in my indi (some repaint??)

bd_crossover_bdv09_02_20.ex4

Anyway, with some optimization, I got excelent results to EURJPY 2010/jan ~2010/april.

88% profit trades

4.24 profit factor

1 consecutive loss

eurjpy_01-04-2010.htm

eurjpy_01-04-2010.htm

Now I'll make more BT and, if it is worth, we can add some features to the EA, like allow add entries and Money Management.

Thankyou very much! You were very fast, are a great programmer!

Reason: