Any sample MQL5 EA?

 
Anyone has a sample EA written in MQL5? The 2 samples that come with the download chart on chart and a naked woman is not useful for mere mortal just trying to code a simple EA.
 

Hi,

This is my sample EA.

Entry is 2 EMA cross.

Exit is sl or tp.

Files:
 
fai wrote >>

Hi,

This is my sample EA.

Entry is 2 EMA cross.

Exit is sl or tp.

fai, thks a million!

 

MACD Sample

Files:
 

Not even sure why links and adverts are coming up linking to the 2007 championship......its two years old.
 
stringo wrote >>

MACD Sample

There are 11 errors in some .mqh file while compiling.

 
bcsunwww wrote >>

There are 11 errors in some .mqh file while compiling.

'MACD Sample.mq5' MACD Sample.mq5 1 1
'Trade.mqh' Trade.mqh 1 1
'SymbolInfo.mqh' SymbolInfo.mqh 1 1
'PositionInfo.mqh' PositionInfo.mqh 1 1
'AccountInfo.mqh' AccountInfo.mqh 1 1
'IndicatorsCollection.mqh' IndicatorsCollection.mqh 1 1
'Indicators.mqh' Indicators.mqh 1 1
'Indicator.mqh' Indicator.mqh 1 1
'ArrayObj.mqh' ArrayObj.mqh 1 1
'Array.mqh' Array.mqh 1 1
'Object.mqh' Object.mqh 1 1
'ArrayDouble.mqh' ArrayDouble.mqh 1 1
'ENUM_TRADING_OPERATION' - static or extern declaration without type AccountInfo.mqh 41 58
'trade_operation' - comma expected AccountInfo.mqh 41 81
'ENUM_TRADING_OPERATION' - static or extern declaration without type AccountInfo.mqh 322 58
'trade_operation' - comma expected AccountInfo.mqh 322 81
'expert' - struct member is undefined Trade.mqh 166 14
conversion possible loss of data Trade.mqh 166 26
'expert' - struct member is undefined Trade.mqh 262 14
conversion possible loss of data Trade.mqh 262 26
'expert' - struct member is undefined Trade.mqh 311 14
'expert' - struct member is undefined Trade.mqh 332 39
'trade_operation' - undeclared identifier AccountInfo.mqh 324 41
'AccountFreeMarginCheck' - function is not defined AccountInfo.mqh 324 11
'OP_BUY' - undeclared identifier MACD Sample.mq5 403 37
11 error(s), 2 warning(s) 1 1

 

Check out this blog post. You can download samples EA's.


http://www.jeremywhittaker.com/2010/10/24/mql5-sample-ea-or-expert-advisors/

Reason: