CROSS EAs

 

Hello,

I'm not a program so I have a request to make to anyone who is a MetaTrader 4 programmer. Ok here it goes. All I want the robot to do is use two lines the EMA 6 and the EMA 12. When the EMA 6 crosses (or goes above) on TOP of the EMA 12 I want the Robot to BUY. When the EMA 6 crosses on the BOTTOM (or goes below) the EMA 12 I want the Robot to SELL. I want to have this Robot work in all different time frames. If this is possible please get back to me ASAP. I would greatly appreciate it if anyone took on this little project, or big project Below is a pic of what the EMA lines do. Yellow line is the EMA 6 and the Red line is the EMA 12.

Thanks,

Consultant

Files:
ema.bmp  358 kb
 

easy project. but you need to clarify when to exit? EMA6 cross up EMA12, close short and open long, right? EMA6 cross down EMA12, close long and open short, right???

 
blooms:
easy project. but you need to clarify when to exit? EMA6 cross up EMA12, close short and open long, right? EMA6 cross down EMA12, close long and open short, right???

Blooms. Yes, you described what I wanted in one sentence I would like to run this on M15, M30, H1, and H3. I think it will be a very good Bot from my trading experience. Please let me know the time frame in which this Bot could be made, if it is a simple process.

Thanks for the quick response,

Consultant

 

I think what you need have already been done by codersguru. See https://www.mql5.com/en/forum/173468. Just download the version 1 of the EMA_Cross EA and change the ShortEma to 6 and LongEma to 12.

 
pengie:
I think what you need have already been done by codersguru. See https://www.mql5.com/en/forum/173468. Just download the version 1 of the EMA_Cross EA and change the ShortEma to 6 and LongEma to 12.

I read through Guru's Thread on the EMA Bot that he made, but what I'm looking for is a little bit different. Like you mentioned I looked at his Version 1 EMA_Cross and changed the Long and Shorts to 6 and 12, and I noticed he had a stop loss, or trailing stop. I don't need either of those. All that is needed is a BUY trigger when the EMA6 lines goes over the EMA12 lines and a trigger to SELL when the EMA6 lines go under the EMA12 lines. I guess it's a lot simpler then Guru's EMA_Cross Bot.

Thanks,

Consultant

 

codersguru's version 1 of EMA_Cross do not have stoploss. If you do not wish to have trailingstop, just set its value to zero.

 

Could I set the values up like this?

//---- input parameters

extern double TakeProfit=0;

extern double Lots=1;

extern double TrailingStop=0;

extern int ShortEma = 6;

extern int LongEma = 12;

In other words I just want the EMA6 going above the EMA12 to be the BUY point and the EMA6 going below the EMA12 to be the sell point. So I don't need the TakeProfit function and the TrailingStop function. I also attached a file to illistrate what I want the Bot to do. I wish I was a coder

Thanks,

Consultant

 

You cannot set the TakeProfit=0. Otherwise the order will not go through. Just set the parameters as:

//---- input parameters

extern double TakeProfit=10000;

extern double Lots=1;

extern double TrailingStop=0;

extern int ShortEma = 6;

extern int LongEma = 12;

It should be quite impossible to get a 10000 pips profit . But if 10000 is too high, just set it to maybe 1000.

It is not too difficult to learn how to read and modify the code. You will be able to do it if you are willing to learn.

 

Try this one.

Files:
ma_expert.mq4  5 kb
 

ma_expert.mql (Newdigital)

Is it possible to add a "Take Profit" to this expert, leaving the rest of it intact just the way it is? I cannot program and would appreciate the changes if it can be done. Thank you.

Files:
ma_expert.mq4  5 kb
 

1. MA_ExpertProfit.mq4: it is the same EA but it will close the orders in s/l or t/p only.

2. MA_ExpertProfit_all.mq4: it will close the order on s/l or t/p, or on the other crossing signal. This EA should work on particular account only. Just change the line "int Account = 111111;" to your account number inside the code. For example your account is 1235463. So this line should be like this:

int Account = 1235463;

3. MA_ExpertProfit_noacc.mq4: it is the same with item # 2. But without any account and it may work in any account (i mean account in Metatrader).

I am not really sure that this EA will work fine.

Try.