Hi coders, please help me to make the simplest EA you can do with the following default input parameter
=====
Signal
=====
MA period: 5
MA method: exponential
MA shift: 0
=====
MONEY
=====
Lots: 0.01 //if 0 use risk calculation
Risk: 2% //if 0 use manual lots size
Base: balance //option: balance, equity, free margin
Take Profit: 100 //mandatory, 100 points = 10 pip
Stop Loss: 50 //mandatory, 50 points = 5 pip
Trailing Stop: 25 //works in similar way to MT4 terminal default stop loss
=====
FILTER
=====
Max open: 10 //maximum allowed open position
Max Spread: 10
Max Slippage: 3
Start hour: 10 //server time
End hour: 22 //server time
=====
Entry
- Buy if current open candle below MA(x) low
- Sell if current open candle above MA(x) high
Exit
based on take profit, stop loss or trailing stop (no special exit function)
Note:
- Lots & Risk cant be 0 in both field, if both field 0 give error message
- if both Lots & Risk have value, the program will use risk for new order
- please see attachment for visual idea how entry strategy should works
- if possible, please share the source code & compiled file (mq4 & ex4) so other member can tweak or add new feature to this simple EA
=====
Signal
=====
MA period: 5
MA method: exponential
MA shift: 0
=====
MONEY
=====
Lots: 0.01 //if 0 use risk calculation
Risk: 2% //if 0 use manual lots size
Base: balance //option: balance, equity, free margin
Take Profit: 100 //mandatory, 100 points = 10 pip
Stop Loss: 50 //mandatory, 50 points = 5 pip
Trailing Stop: 25 //works in similar way to MT4 terminal default stop loss
=====
FILTER
=====
Max open: 10 //maximum allowed open position
Max Spread: 10
Max Slippage: 3
Start hour: 10 //server time
End hour: 22 //server time
=====
Entry
- Buy if current open candle below MA(x) low
- Sell if current open candle above MA(x) high
Exit
based on take profit, stop loss or trailing stop (no special exit function)
Note:
- Lots & Risk cant be 0 in both field, if both field 0 give error message
- if both Lots & Risk have value, the program will use risk for new order
- please see attachment for visual idea how entry strategy should works
- if possible, please share the source code & compiled file (mq4 & ex4) so other member can tweak or add new feature to this simple EA
1