Expert Advisors: Simple MA EA

 

Simple MA EA:

Really simple EA for those who needs an example and for those who is looking for something to try out new Strategy Tester.

EA is based on two MA lines. If one lines is crossing another then SELL or BUY.

Author: outkast

Simple MA Expert Advisor

 

Regards,

 

Mr/Mrs tsaktuo, I have studied your code K_eSimpleMA and it has been very usefull in order to understand how the structure of an EA is, as well as concepts like how to work with SMA crosses.

I really appreciate you have shared this article and I Thank you very much.

On the other hand I have a couple of questions; both are related with SymbolInfoTick function:


What the manual of MQL5 says about  SymbolInfoTick(Symbol(),tick) is that it returns current prices of a specified symbol in a variable of the MqlTick type and it also says that the function returns true if successful, otherwise returns false.

According above, what I understand is that the message ("Failed to get Symbol info!") is printed if there is not tick received,. Is this correct?  . If it is not correct could you please tell me what it is about?

The other question is: What happen if the message is printed every tick?

 

 Again, thanks.

 
Automated-Trading:

Simple MA EA:

Author: outkast

Hello Outkast,

I am new to EA's i just imported Mr. tsaktuo esimpleMA,  since i really dont understand the Code, I see it running on my chart, but am i suppose to set some of the MA values, I dont know need help need a class or a book.  ???

 

I was happy to find your code example as it solved my problem of buffering the MA and making it appear on a chart.  Thanks for posting it.

The one question that I have is how does it make the decision to close the open order? 

 

Thanks 

 
bdwezensky:

I was happy to find your code example as it solved my problem of buffering the MA and making it appear on a chart.  Thanks for posting it.

The one question that I have is how does it make the decision to close the open order? 

 

Thanks 

Only with SL and TP.
 
I tested this EA in the strategy tester, the stoploss doesn't seem to function properly and there's a big gap between the balance curve and the equity curve indicating that the trades are not closed even if the price already reached the stoploss level. Anybody knows why? Thanks in advance!
 
polymath:
I tested this EA in the strategy tester, the stoploss doesn't seem to function properly and there's a big gap between the balance curve and the equity curve indicating that the trades are not closed even if the price already reached the stoploss level. Anybody knows why? Thanks in advance!
on trading is not enough using only MA is depending same on MFI, RSI, stochastic. The MA not include this information. but there exist no one including controls to booth  indicators right now. most time to identificating the best SL (stoploss) is neccessari to have information of RSI, stochastic, MFI. for example : if MA 200 is getting and RSI anc stochastic is again high most time would go again up or down ( dipending of trade direction). same is for dayli economic calendar information there can move a pair over 100 pips and is not calculated in the EA's. look friday EUR USD there was a big move but eur has getting the way again ( this move can broke an little SL).
 

Hi,


I'm facing some issues with the code. It's showing error order filling type. Please look into the screenshots attached. Screenshot for error: Strategy tester settings mt5 editor with same code as provided above Strategy tester showing the error generated10030 error caught

 
prajwalrao2013:

Hi,


I'm facing some issues with the code. It's showing error order filling type. Please look into the screenshots attached.10030 error caught

You've testing an old EA, it would be strange if it didn't had any errors after so many years.