Universal MA Cross EA - page 52

 

Indicators

Maybe I missed something, can someone please clarify.. what indicators are being used on this.

Thank You,

Mike

 

3 MA indicators

Hello Snakemaster. The only indicators used are good old exponential moving average's. You just have to tweak the periods depending on how active the market is. And avoid news releases !!

 

No trades placed

Hey everybody, I'm testing this ea on 2 different brokers but no trades are being opened. I have gone through the settings a few times and cannot see where there is a problem. Checking the experts tab at the bottom shows comments that there was a cross but still no trades. Any suggestions on how to fix this?

 
cosmiclifeform:
Thanks Ricky,

Helpful to at least see the consistency. That's actually a good thing in debugging!

Earlier you said:

1) I will run it again on a couple of charts on Monday,perhaps on a shorter timeframe than 1 hour to get a few cross situations and see whether it trades.

* Good strategy. I test for 1 month and find 1 good week of trades to help speed up testing. Smaller logs, easier to find debug errors.

2) I will run it with MCD set at 5 and Look-up set at 0, and see how it goes.

* These are interesting features and they actually work well. Problem is that the code locks them both together.

if(MaxLookUp>0 && MinCrossDistance>0)

You will notice the "&&" so both need to be > 1 for them to work. So MCD=5 and MLU=0 will not work with the present code. I explored trading on the same crossing bar and to make MCD crossing work without the MLU...I changed it to:

if(MaxLookUp==0 && MinCrossDistance>0)

Maybe someone can look at this and make it into an option? Meanwhile that change works well for me.

3) I currently have my takeprofit and stoploss set with an extra "0",as suggested by others who have had similar problems in opening trades.

So my 150 becomes 1500 and my 80 becomes 800. One thing I have noticed when doing this however, is that the "1500" becomes "1500.00",and the "80" becomes "800.00". Perhaps that is the problem here? Shouldn't it just become "1500"?

* I only use single digit TP and SL=0, so I have not found a problem with using single digits for TP or SL. BTW, where do you see the "1500.00 and 800.00"?

* I posted a follow up earlier on the 4107 error challenge. I hope this helps everyone...and thanks to Serpentsnoir for the debugging help!

Take care,

Robert

Robert and Ricky,

Made some more changes. This time I backed out a few things to get us back to a point to where the points are handled automatically.

That means, right now, that if you are on a 5 digit broker, then use 100 to mean 100 and if you are on a 4-digit broker use10 to mean 10. I'm just doing this to eliminate one more possible problem.

I will also look at making the changes (noted above) when we get this one solved. Another request to take half at a specified target will follow.

To summarize: the 4107 is an invalid price, 130 is invalid stops (TP, SL), and 131 is invalid lotsize.

Do you mind testing again with the attached version?

sn

 

Thanks for your hard work-

I have been offline for a week,hence my absence.

I have downloaded your revised edition of this ea and will give it a go this coming week.

I will post results accordingly.

Its an ea that has all the options one could wish for in a crossing ea, so it's worth persevering with.

Kind regards

rickyc

 

Hi guys. Can someone help me to find EA with this very simple conditions:

TFs: H4 Daily Weekly Monthly

Open sell when price close below 14 SMA (low)

Open buy when price close above 14 SMA (high)

If somebody include RR, will be cool (Trailing stop, 2%(golden rule), 2\1)

Oh i forgot

I have additional filter for this strategy.

Again thanks all for hard working on this MA crossovers.

P.S. Sorry for poor eng

 

Please advice.

This EA just sending Alerts about crossings, but doesn't open any trades. What is going wrong? Thank you!

 

Pls kindly help since this EA doesn't open trades, alert signal only.

I only change the T/P, S/L, MA1 - MA2 period & lot size (this is because I try this on alpari micro account).

I also have enable the Microaccount function from "false" to "true".

 

Point Mod and MCD/MLU Mod

serpentsnoir:
Robert and Ricky,

Made some more changes. This time I backed out a few things to get us back to a point to where the points are handled automatically.

To summarize: the 4107 is an invalid price, 130 is invalid stops (TP, SL), and 131 is invalid lotsize.

Do you mind testing again with the attached version? sn

Hi Serpentsnoir,

Thanks for the Point mod to test. Seems to work fine. I tried it on FXDD with 2 and 4 Digits and FXCBS with 3 and 5 Digits...worked good with all digits and did not get any 4107 errors using the various MCD MLU settings. Looks like the Point fix works fine. Hopefully some others can confirm this Point mod works fine also.

Earlier I posted that "NormalizedDouble" seems to work as well, but I think this Point solution is cleaner code.

Nice job...and ready for the presses...v5?? ...lol!.

Here's a follow up for the MCD and MLU issue:

I went back and looked at the MCD and MLU code.

if(MaxLookUp > 0 && MinCrossDistance>0)

This is really great code, simple and functional. The basic problem with this code was that it linked MCD and MLU together, meaning you needed to use both Min Crossing Distance AND Max Look Up together, both had to be 1 or greater, which makes the trade 1 or more bars later. This is good for confirmation and safer trades, but I wanted the option to set min cross on the same bar without the max look up set, so I changed the code to the following.

if(MaxLookUp >= 0 && MinCrossDistance>0)

It now seems to let me have the option to trade on the same bar or later bars.

Please check it out and let me know if it works well, and we can add it to the next version with your Point mod.

Thanks for your efforts,

Robert

Here's some UMAC logs showing no 4107 errors:

UMAC - V4 - Log - 5 Digits

universalMACrossEA[5 Dig]-V4 GBPUSD..,H1: Last Trade : None

universalMACrossEA[5 Dig]-V4 GBPUSD..,H1: open #1 buy 5.00 GBPUSD.. at 1.59431 tp: 1.59436 ok

universalMACrossEA[5 Dig]-V4 GBPUSD..,H1: sn Debug on buy: ticket,err,count 1/0/0

universalMACrossEA[5 Dig]-V4 GBPUSD..,H1: sn Debug on buy: Ask,Slippage,aStopLoss,aTakeProfit 1.59431/5.00000/0.00000/1.59436

universalMACrossEA[5 Dig]-V4 GBPUSD..,H1: BUY order opened : 1.5943

Tester: take profit #1 at 1.59436 (1.59437 / 1.59483)

universalMACrossEA[5 Dig]-V4 GBPUSD..,H1: open #2 sell 5.00 GBPUSD.. at 1.59311 tp: 1.59306 ok

universalMACrossEA[5 Dig]-V4 GBPUSD..,H1: sn Debug on sell: ticket,err,count 2/0/0

universalMACrossEA[5 Dig]-V4 GBPUSD..,H1: sn Debug on sell: Bid,Slippage,aStopLoss,aTakeProfit 1.59311/5.00000/0.00000/1.59362

universalMACrossEA[5 Dig]-V4 GBPUSD..,H1: SELL order opened : 1.5931

Tester: take profit #2 at 1.59306 (1.59260 / 1.59306)

UMAC - V4 - Log - 2 Digits

universalMACrossEA[5 Dig]-V4 USDJPY,H1: Prev : UP - Curr : DOWN

universalMACrossEA[5 Dig]-V4 USDJPY,H1: MA Cross SELL

universalMACrossEA[5 Dig]-V4 USDJPY,H1: open #1 sell 1.00 USDJPY at 90.24 tp: 90.19 ok

universalMACrossEA[5 Dig]-V4 USDJPY,H1: sn Debug on sell: ticket,err,count 1/0/0

universalMACrossEA[5 Dig]-V4 USDJPY,H1: sn Debug on sell: Bid,Slippage,aStopLoss,aTakeProfit 90.24/5.00/0.00/90.32

universalMACrossEA[5 Dig]-V4 USDJPY,H1: SELL order opened : 90.24

universalMACrossEA[5 Dig]-V4 USDJPY,H1: Prev : DOWN - Curr : UP

 

Thanks for that update, I will be trying,once again to get this ea trading in the following week.

Kind regards

rickyc