Looking for EA (Price crossing MA)

 

Hi, Can anyone point me to where I can find an EA that does the following:

When the price is under a 30 MA (30min chart) and the price crosses the 30MA from under going up and a new bar opens above the 30MA a BUY order must be opened. Order must be opened on FIRST bar that opens above or below. Vice versa for a SELL. Any input apprciated. Many thanks

 

Hoosain: I am interested in this kind of setup and was wondering if you found an EA?

 

Some question, are you going to set a Stop Loss and Take Profit ? How about the exit criteria ? Is this going to be Stop And Reverse / Always In Play trade ? Thank you for your input

 
firedave:
Okay, try this one. Use on any time frame, any pair, any MA period, any MA method, any MA price. Build in stop and reverse method, time filter, and money management. Some note :

- if TrailingStop set to 0, mean no trailing stop feature

- if StopAndReverse set to true, mean it will close the trade and open new one, if signal change.

- if UseHourTrade set to false, mean no time filter.

- Lots is set to 1, but if MM set to true, mean it will adjust the Lots according to the money management risk.

I didn't try it yet nor backtest it, so please give me some input. Hope this help

firedave,

Congratulations!

Very clean and tidy code. You did a great job.

 

Hi codersguru, it's an honor to have a compliment from the code master. I hope you don't mind that I use some of your function code, I put your name as the coder. Thank you for many of your guidance and support all this time, I've learnt a lot from you. Hope I could contribute something for the community. All the best for you

 

Okay, try this one. Use on any time frame, any pair, any MA period, any MA method, any MA price. Build in stop and reverse method, time filter, and money management. Some note :

- if TrailingStop set to 0, mean no trailing stop feature

- if StopAndReverse set to true, mean it will close the trade and open new one, if signal change.

- if UseHourTrade set to false, mean no time filter.

- Lots is set to 1, but if MM set to true, mean it will adjust the Lots according to the money management risk.

I didn't try it yet nor backtest it, so please give me some input. Hope this help

ps. I updated the file, got some mistake for variable setting

Files:
 

Thanks for the EA firedave. I shall have a look at it later.

Thanks.

 

hi,

this EA can be modified such that there is no TP and SL. The buy and sell to be dictated by the crossing of the price and the MA. Anybody can help with getting this setting.

Thx

 
iliaazshareef:
hi,

this EA can be modified such that there is no TP and SL. The buy and sell to be dictated by the crossing of the price and the MA. Anybody can help with getting this setting.

Thx

To do this, just set StopLoss and TakeProfit to 0 (zero) then set StopAndReverse to true (default setting). Hope this help

 

Hi Firedave, many thanks for the EA. Will test it and let u know how it goes.

Best regards

 
firedave:
To do this, just set StopLoss and TakeProfit to 0 (zero) then set StopAndReverse to true (default setting). Hope this help

thank you firedave , i will forward test it and post the results .