MA cross/Price cross MA EA - page 14

 
mladen:
In one of the circles you marked there there is no price crossing ma at all (the first circle is not pointing to any possible cross). Anyway. good luck with a quest for an EA that you need

what!!! u gurus are my good luck in this quest hehehe if u think its not possible then i wanna know this for my knowledge......,. so its not possible to close an existing buy deal first n then open a sell deal, cuz us broker is bounded by some stupid fifo rules. first in first out policy that forbid u from opening sell when buy is going on or a buy when sell is going. secondly if that can be worked out then what were u talking about macd cross by making one line in it as 1 n can be used just like this ma price cross, i mean is it possible or i should just give up on ea n continue with manual trading when indicator makes sounds

 
lover:
what!!! u gurus are my good luck in this quest hehehe if u think its not possible then i wanna know this for my knowledge......,. so its not possible to close an existing buy deal first n then open a sell deal, cuz us broker is bounded by some stupid fifo rules. first in first out policy that forbid u from opening sell when buy is going on or a buy when sell is going. secondly if that can be worked out then what were u talking about macd cross by making one line in it as 1 n can be used just like this ma price cross, i mean is it possible or i should just give up on ea n continue with manual trading when indicator makes sounds

If you are already making indicators it should take no time at all for you to make a simple EA that does exactly what you need (all in all it should not take more than 50-60 lines of efective code)

All the best

 
mladen:
If you are already making indicators it should take no time at all for you to make a simple EA that does exactly what you need (all in all it should not take more than 50-60 lines of efective code) All the best

What nooo i am not making no indicators i am using indicators that u and mrtools made n are working good i dont know how to do the coding in there.. frankly i am in my final year of engineering so i needed a ea that could just keep running in the back ground so that i can do my studies n other things. i was thinking of higher ma settings on a higher time frame or something like that but if its not gonna work then i will just hold it for a while. computer coding is something i find very hard with all that lines of code hehehehe a friend told me about this forex trading a couple years ago n since then i keep putting my money in there losing n winning its like a vicious cycle so i said if its a vicious cycle atleast it needs to be an automated vicious cycle

 
lover:
What nooo i am not making no indicators i am using indicators that u and mrtools made n are working good i dont know how to do the coding in there.. frankly i am in my final year of engineering so i needed a ea that could just keep running in the back ground so that i can do my studies n other things. i was thinking of higher ma settings on a higher time frame or something like that but if its not gonna work then i will just hold it for a while. computer coding is something i find very hard with all that lines of code hehehehe a friend told me about this forex trading a couple years ago n since then i keep putting my money in there losing n winning its like a vicious cycle so i said if its a vicious cycle atleast it needs to be an automated vicious cycle

Here is an Ea that is as simple as it gets (I can not think of a simpler way to do that) that opens orders when price crosses moving average and closes opposite order (of exists) before opening a new order. It allows only one opened order per symbol-magic number combination. There are not extra controls nor anything complicated in the EA. The only "complicated" thing is the ECN broker choice (in order to be able to handle stop loss and take profit on ECN type brokers). If you remove comment lines, it is abou 60 lines of code all in all

All the best

 
lesath999:
Hi,

I like this EA.

So I optimize it .

Sory, I mistake it.

 
mladen:
Here is an Ea that is as simple as it gets (I can not think of a simpler way to do that) that opens orders when price crosses moving average and closes opposite order (of exists) before opening a new order. It allows only one opened order per symbol-magic number combination. There are not extra controls nor anything complicated in the EA. The only "complicated" thing is the ECN broker choice (in order to be able to handle stop loss and take profit on ECN type brokers). If you remove comment lines, it is abou 60 lines of code all in all All the best

amazing amazing sorry i wasnt here to pickup my xmas gift was busy getting a place with my gf, but i am all good now, thanks u very much all i needed was a very simple non thousand settings ea that opens orders n closes open orders first hehehe, i am pretty sure it works cuz i know u r a pro expert hehehe thanks ya u r great

 
mladen:
Here is an Ea that is as simple as it gets (I can not think of a simpler way to do that) that opens orders when price crosses moving average and closes opposite order (of exists) before opening a new order. It allows only one opened order per symbol-magic number combination. There are not extra controls nor anything complicated in the EA. The only "complicated" thing is the ECN broker choice (in order to be able to handle stop loss and take profit on ECN type brokers). If you remove comment lines, it is abou 60 lines of code all in all All the best

checked it on strategy testers works like a charm it closes open before opening a new one perfect it does exactly what i was looking for amazing

ok heres is me being a pain in the dash dash lol... i recently found the tim morris ma posted by mladen n i came up with a good combo of it crossing over with a moving average on a higher time frame n i am talking about 4 hr time frame, n gives a pretty decent signals yay so our gentleman tim morris ma crossing over a simple ma everything else the same as in this ea, but adding tim morris into it as a cross over hehehehehe such an ea is possible huh i know i know look if u great santas have time from ur busy schedule then only look into it, i am pretty fine with that ea, but tim morris is fast enough even on a slowed down mode on higher time frame is does give good signals so if u have time then see if it is possible to add tim morris cross over with a simple ma .... to the ea u made this one simplified one the one that works perfectly, see if u can just add tim to it hehehehe, thank u even if it is not possible i am just more than happy that i got this ea working perfectly on the higher timeframe thanks ya

 
mladen:
Here is an Ea that is as simple as it gets (I can not think of a simpler way to do that) that opens orders when price crosses moving average and closes opposite order (of exists) before opening a new order. It allows only one opened order per symbol-magic number combination. There are not extra controls nor anything complicated in the EA. The only "complicated" thing is the ECN broker choice (in order to be able to handle stop loss and take profit on ECN type brokers). If you remove comment lines, it is abou 60 lines of code all in allAll the best

Hi mladen,I was looking for a simple 'price crosses ma' EA like this too and your creation works more than fine, thank you very much. Started to learn mql4 a few days ago, but for now it would be nice if you could add a function that allows the user to decide how much percentage of his equity he or she wants to risk per trade, so, when price is trending, trades would open with higher lotsize than when there's a losing streak, during choppy times. Adjustable 'Trading hours' would also be handy to avoid the slow Asian session, for instance, but if you could 'only' code the 'money management' thing, I would be utterly grateful already.If you're too busy right now (it's close to New Year, after all), or just not interested in changing anything for this EA, I'll understand, of course. Really appreciate all the work you've already put in, allover the net, trying to help newbies and more experienced traders alike with their efforts to become good/better at this hard game.Happy New Year for you and your family!Ronald

 

Hi Mladen

Could you please check and fix the min and max cross distance codes. After testing for sometime I found that they are not working as they should. Ideally, after the price crosses ( on closed bar) above or lower than the upper or lower MA, a new trade should open on next bar only if the price distance from the MA ( upper for long trade and lower for short trade) is within the min and max distance. Additionally, if the condition is not met on each bar then the entry condition should be checked on future bars (upto a maximum number of future bars specified ) I hope I am clear.

Further, an additional take profit feature will help where tp happens on hitting a MA line.

I will be grateful if you find sometime to help me.

Many Thanks

Sachin

 

Dear Mrtools I am waiting for ur assistance since august

mrtools:
Thanks am aware of that and am trying to fix.
Reason: