Experts: MA_Mirror EA

 

MA_Mirror EA:

Based on the idea of pramono72 I wrote an Expert Advisor for it. It may also server as a simple way to write expert advisors using an include file and very few code lines.

Author: Thomas Quester

 
I have tried your EA and have an error message: MA_MirrorEA EURUSD,M1: Error invalid trade volume, an EA was not working, may I know what's wrong with it. Thanks.
 
kwng:
I have tried your EA and have an error message: MA_MirrorEA EURUSD,M1: Error invalid trade volume, an EA was not working, may I know what's wrong with it. Thanks.

This is the lot size, default ist 0,01 but this small is not allowed by all brokers.
 

I have the same error, "Invalid stops, Order Send error 130", and I have tried many different lot sizes with no difference.

Have you got a hint on why your stoploss or stops are failing!

I also noticed that "EA.mqh and MA_MirrorEA.mq4" when compiled, show all errors about missing links to functions.

Thanks

Roger

 

I don't think the signal function is doing much, just gets the difference of CLOSE & OPEN prices, we only need one variable MA, no need of ma1 & ma2, ma2 is opposite of ma1

int Signal()
{

int i=1;
int signal = -1;

double ma;

ma=iMA(NULL,0,MovingPeriod,MovingShift,MODE_SMA,PRICE_CLOSE,i)-iMA(NULL,0,MovingPeriod,MovingShift,MODE_SMA,PRICE_OPEN,i);

if (ma > 0) signal = OP_BUY;
if (ma < 0) signal = OP_SELL;

return (signal);

}
 

There are some brokers which do not allow setting the stop loss at the same time as opening the order.

The EA has more functions than nessary, this is because I develop ea.mqh separatly from the experts, so each expert profits from a new version of ea.mqh.

 
I think it also makes the moving average react faster - at least it is more successful than using a single ma.
 

Thankyou very much.

I put the ea file in experts folder and try to run the ea on chart but it is not working. Please suggest me if anything to do with above two files as well.


Regards

Mayank

 
Thanks for EA, this EA did not start. the error is "Cannot open file: c:\meta\ SIGTrader\experts\MA_MirrorEA.ex4 on the GBPUSDX,M1". Please specify instructions on how to go about your EA.
Reason: