My FX strategy - PipMachine. - page 7

 

u work in a bank or what...........

 
 
jonnydenver69:
u work in a bank or what...........

LOL... no, haven't worked for over 15yrs.

Any way, think about it. Taxes constantly going up, Gas/petrol going up, water rates going up, coucil rates going up, M.O.T going up, Car tax disc going up, everything is going up, except for people's wages. So what they got to save?

Sweet F.A.

 

FX guy,

Here is a modified version of the EA. I think it does what you are looking for. Change the "TimeFrame" variable to whatever chartperiod you are using it.

Hope this helps.

Maji

Files:
 

Hi Maji,

Thanks again for editing the file.

Still have a problem. Dont' get me wrong, there is a slight improvement, but you've forgot one thing.

You know when the ADX & -DI for example, reaches the ADXLevel?

Ok, it opens the short trade correctly.

But when the -DI goes below the ADXLevel and the ADX hasn't. It closes the trade. It shouldn't do this. It should ignore that if one of the conditions is still true, so it should wait for BOTH the -DI and ADX to go below the ADXLevel together, then close.

So basically, it should be doing what the ADX & +DI is doing.

 

You know what would be good to add to it? Trailstop.

 

Elihayun

Hallo. Thank you for sharing you idea and I just loading your programm for test. Unfortunelich every time i loading the MACD Cross i will get EMA Cross inside. Please have a look to it. Thanks. Karl

 

Hi Karl,

I'm not sure what you are referring to, Macd Cross EMA inside of it. This EA doesn't use the macd or EMA. It's just using the ADX, Unless of course you're referring to the first one that uses the Macd & EMA & ADX???

can you post an image to let us know what you mean and what your chart looks like.

 

FXguy,

You were right, I had used ">" instead of "<" for the short cover section.

I hope the attached code fixes that bug.

I tried to incorporate a trailing stop also.

Maji

Files:
 

Arh cool - thank you.

I ran a test. Not sure what to say really. I would imagine that it would need a DIFFERENT indicator to confirm the close of these trades, because it doesn't look like it's up to the mark to souly rely on the ADX to close the trades - there's too much noise going on, need some clearer signals to close them

It's ok to open them at the times it does, those aren't really the problem.

So I placed two ema's on the chart, ran some manual backtesting on it to see where EMA1(fast) and EMA2(slow) crossed over after the ADX and the DI line reached the ADX level to open the trade.

From what I can see, if EMA1(fast) and EMA2(slow) were to be added into the CLOSE clause, this would take out all of the unnecessary noise that the ADX is causing when it's trying to close the trade.

So if it were to do this:

ADX & +DI => 20 ......... then go long.

EMA1(fast) is < EMA2(slow) ........ then close the long trade.

ADX & -DI => 20 .......... then go short.

EMA1(fast) is > EMA2(slow) ..........then cloes the short trade.

Here's an image to show you what I mean.

Blue Cirlces are Short positions taken on by the ADX & -DI hitting the mark of 25.

The Green circles are Long positions taken on by the ADX & +DI hitting the mark of 25.

The Red Arrow is the point at which that trade is closed, and this is operated by the EMA1(fast) and EMA2(slow). (so it no longer relies on the ADX to close the trade so it takes out the noise that the ADX causes).

I've drawn white lines and llinked up the trades so you can see which one it opens and which one corresponds to that trade when it closes it.

I've drawn gray arrows to show the point at which the trade is opened. I've tried to get them as close to the period(bar) a possible.

And as you can see, there is a significant difference here in regards to how many pips it can make. On that chart alone, there's about 200-360 pips that could of been made.