This is a simple Expert Advisor the strategy of which consists of opening orders following a trend toward the current movement.
The robot is based on two algorithms:
- Trading algorithm, combination of Moving Average and MACD.
- Trading algorithm (the idea is taken from my MA TREND SG indicator), combination of MA and special smoothing algorithm in conjunction with the ATR indicator
It allows the EA to half the step (38 = 0,0038) and increase number of orders comparing to Exp Eli.
- TradeR: if TradeR=true, the EA determines the number of lots.
- Lots: lot size. If TradeR= false, you can specify the lot on your own.
- Risk: risk size. For brokers where 1 lot is $100.000, Risk cannot exceed 2. For example, if Risk=1.537, this value is equal to 15.37% of the account.
- M: Moving Average period. Parameter
- Atr: ratio of decreasing ATR. Parameter
- P: Moving average period.
- n: MACD period.
- n1: MACD period.
- step (38 = 0.0038): step to open the second order.
- Magic: order magic number.
- Stop (38 = 0.0038): Stop Loss.
- TakeProfit: Take Profit.
Changed algorithm of Money Management
Improved the EA operation with small accounts
- mode — mode parameter.
- safety — mode parameter.
As a matter of fact you have two EAs: one works in safe mode, another one works in aggressive mode.
If mode = true and safety = true, the EA works in protective mode using following settings: step=38;M=8;n=10;n1=26;Stop =100.
If mode = true and safety = false, the EA works in aggressive mode using following settings: step=17;M=6;n=21;n1=22;Stop =62.
Note: if mode = true, you cannot change values of step, M, n, n1, Stop.