Download MetaTrader 5

Expert Advisors: Simple MA EA

To add comments, please log in or register
Automated-Trading
Admin
100952
Automated-Trading 2010.04.27 10:28 

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

cafe
15
cafe 2010.05.20 02:12  

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.

derek
44
derek 2010.07.28 06:00  
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.  ???

bdwezensky
20
bdwezensky 2010.07.29 02:15  

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 

Karlis Balcers
6790
Karlis Balcers 2010.10.12 23:28  
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.
polymath
182
polymath 2012.08.05 09:41  
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!
Michael Philipp
185
Michael Philipp 2013.12.07 10:37  
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).
To add comments, please log in or register