Ema Cross! - page 64

 
european:
FireDave, thanks for the changes. What TF and settings it should be using?

Hi, I'm forward testing original EMAcrossMOD on GBP/USD H1 chart. Hope this help

 
Aaragorn:
I just backtested this on the daily TF from 1-1-2005 to today and had ZERO losses! Can this be true?

//---- Trades limits

extern double

TakeProfit = 20,

TrailingStop = 20,

StopLoss = 20;

extern bool

UseStopLoss = false;

//---- EMAs paris

extern int

ShortEma = 10,

LongEma = 80;

//---- Crossing options

extern bool

immediate_trade = true, //Open trades immediately or wait for cross.

reversal = false, //Use the originally reversal crossing method or not

ConfirmedOnEntry = false;

//---- Money Management

extern double

Lots = 1;

extern bool

MM = true, //Use Money Management or not

AccountIsMicro = true; //Use Micro-Account or not

extern int

Risk = 10; //10%

extern int

MAGICMA = 20060301;

extern bool

Show_Settings = true;

has anyone tried to optimize this for the 1 or 5 min TF?

what was the total gains!!????

 

I just backtested this on the eur/usd daily TF from 1-1-2001 to today and had ZERO losses! Can this be true?

//---- Trades limits

extern double

TakeProfit = 20,

TrailingStop = 20,

StopLoss = 20;

extern bool

UseStopLoss = false;

//---- EMAs paris

extern int

ShortEma = 10,

LongEma = 80;

//---- Crossing options

extern bool

immediate_trade = true, //Open trades immediately or wait for cross.

reversal = false, //Use the originally reversal crossing method or not

ConfirmedOnEntry = false;

//---- Money Management

extern double

Lots = 1;

extern bool

MM = true, //Use Money Management or not

AccountIsMicro = true; //Use Micro-Account or not

extern int

Risk = 10; //10%

extern int

MAGICMA = 20060301;

extern bool

Show_Settings = true;

has anyone tried to optimize this for the 1 or 5 min TF?

I looked at this on a chart to see what it's doing and this is great if you only want to take 20 pips out of the market every month and a half. But I'm looking for a more agressive approach to the timeline. I'd rather have 5 pips every fifteen minutes or half hour or something.

Files:
 

just so you know I put the 'k' on the EMA_CROSSmodv2(k).mq4 just so I could keep track of when I changed my own settings it's the same version I haven't changed any code just user settings.

I have several questions about this EA. I'm running it forward testing in my demo account now. It appears to enter both a buy and a sell order simultaneously how does it figure? Is it like hedging or something?

Coder's guru can you tell me how this logic is working? How does it exit profitably when it's got profit if it's got another opposing trade? Is that just what it does when starting initially? What is it doing this is intriguing!

Also It appears that the Report generated by the tester is skewed by the final positions closing at stop. Can the final closings be filtered out of the Report> I think the Report tab would show dramatically different without those close at stop results mucking up the report. They really aren't valid are they because the tester had to close them because it ran out of data not because it executed the logics of the EA.

Does anyone else validate these results?

 
firedave:
Okay, here is EMA_crossmod with modification adding ConfirmedOnEntry rule (default setting = FALSE). Hope this help

what is confirmed on entry? is that like asking you to manually confirm each order before it will allow it to be placed?

 

I think I remember someone saying there was an indicator somewhere that would show your order executions on the chart. Can someone please help me find how to get that feature on this? I want to watch it execute on the chart.

 
Aaragorn:
what is confirmed on entry? is that like asking you to manually confirm each order before it will allow it to be placed?

ConfirmedOnEntry = TRUE mean enter the trade on the next bar after the signal bar. Hope this help

 

I wanna thank coder's guru for this amazing EA! I think I'm going to go live with it in small lots and see how well it does if it performs anything like the backtests and forward tests etc.

perhaps all that work i did in my spreadsheets isn't wasted, it taught me how to use this tool an configure it to work for my investing goals. I feel somehow validated in my previous research with moving average strategies. I just needed the tool with enough flexibility to allow me to configure it. All the rest of the stuff you've got here the money management and the way it hedges and straddles each way. It's truly an amazing piece of work. I hope someone explains the rest of it too me some day.

like how it gets out of the opposing trade when it takes profit. I still can't grasp how it's doing it but my account history is showing it manages just fine somehow.

I hope the results continue to model the tests.

I want to thank coder's guru for his mql4 lessons too. I'm still working on wrapping my mind around the language.

 

This is a good strategy. I think I understand how it works. It only closes orders by it hitting the t/p . Which means the only way you would really be in jeopardy of losing money is if you started the EA at either extreme on the chart. If you started it at lowest low in recent years, then you could lose money. If you started it at the highest high in recent years then you could lose. As long as the price goes in either direction 20 pips, it's a good strategy. If the price just continues downward or upward and never retraces, then I think it's possible to lose money on it. But I think given a long enough time frame, it should be a winner.

Codersguru, nice EA. And thanks for sharing it.

I have an idea. As an adjustment to this strategy, what if we simply closed out the opposite order when the sum of the $$$ won and the amount down on the opposite is in the positive? Couldn't this actually increase our odds of a winning EA ? Seems to me this kind of EA would win in the long run about 99.9 % of the time. Your EA needs for it to retrace enough to hit the t/p but even that isn't necessary. I'm going to try to code this up but I might need help.

This strategy would work because as long as the price retraces at all which it usually does, then we would always win. Right?

 
Morpheus:
This is a good strategy. I think I understand how it works. It only closes orders by it hitting the t/p . Which means the only way you would really be in jeopardy of losing money is if you started the EA at either extreme on the chart. If you started it at lowest low in recent years, then you could lose money. If you started it at the highest high in recent years then you could lose. As long as the price goes in either direction 20 pips, it's a good strategy. If the price just continues downward or upward and never retraces, then I think it's possible to lose money on it. But I think given a long enough time frame, it should be a winner.

Codersguru, nice EA. And thanks for sharing it.

I have an idea. As an adjustment to this strategy, what if we simply closed out the opposite order when the sum of the $$$ won and the amount down on the opposite is in the positive? Couldn't this actually increase our odds of a winning EA ? Seems to me this kind of EA would win in the long run about 99.9 % of the time. Your EA needs for it to retrace enough to hit the t/p but even that isn't necessary. I'm going to try to code this up but I might need help.

This strategy would work because as long as the price retraces at all which it usually does, then we would always win. Right?

I think it could be useful to your line of thought to do something like the 'basket profit' used in the divergence trader. I'll attach it below. I've got major issues with the divergence trader but I can see how the basket profit function could be used with this to help reduce the losses of something that gets left behind. There would have to be a way of identifying that a trade has been left behind and once that identification has been made then it could execute new orders like the divergence trader does to bring the accumulated loss back down and then close them both when it's down. Check out the divergence basket profit function and see if something like that would work into your damage control on this.

btw I really like your thought process, i can see what you're getting at. For what ever it's worth in my backtesting now over 300 trades it's not occured that something got left behind***..at least it's not showing up on the backtester if it did.** It looks like it's closing everything it opens....it appears perfect on the backtester, not just good but perfect. No 'valid' losses whatsoever. It's only losses are at the conclusion of the testing when it runs out of data and cannot finish the last pending trades.

**unless I'm mis-interpreting those losses on the end of the test...if indeed they are carry overs from stuff left behind in which case it's giving back alot more if the TP is higher (like 20) and less when it's lower (like 15)

***it occurs to me that there is another way to minimize the occurance of something getting left behind..that being to reduce the TP. This makes a smaller range over which it has to retrace to fill and close. I am sure that there is a statistical point of diminishing returns with the TP which if you go beyond you won't fill and close as often and your risk of "getting left on the far side of the wormhole" increases. (see the deep space nine reruns of the ferengi) As long as the greed factor is reigned in with the TP I think this will function with acceptable risk.

see reports attached...

I would have attached the EA for the EMA CROSS again just for convenience but I can only upload 5 files at a time...suffice it to say that the EA for the EMA CROSS which these reports apply to is on page 64 of this thread post #636 and #638

Reason: