[EA] - Charles 2.1.5 - MetaTrader 4 Expert - MT4/MT5 Resources
![[EA] - Charles 2.1.5 - expert for MetaTrader 4](http://eacpu.com/content/uploadfile/mql5/mql5_2c08130661082827896489cdf865375a.gif)
![[EA] - Charles 2.1.5 - expert for MetaTrader 4](http://eacpu.com/content/uploadfile/mql5/mql5_2be8b585cc2ff146283739b1494bd359.gif)
This version of EA is much more complex than previous versions. The main concepts are the same, use stop loss orders on breakouts, hedge loss orders, try to always close the position with a positive amount.
In addition to this, this version also introduces a lot of features:
Notes : If a "divide by zero" error occurs, you must check the list of symbols provided in the "symbols" parameter. There may be two possible problems 1) Your broker does not support all or part of the specified symbols (you must use only the symbols your broker supports) - 2) Your broker uses different names for the symbols, as in the case of EURUSD it uses EURUSDm or EUR_USD... you must use the name provided by your broker.
If you plan to use the EA on a single chart and a single symbol at a time, just attach the EA to the corresponding chart, paying attention to the MagicNumber and leaving the symbol fields blank .
parameter:
=======================================
0) The time frame is not important. The EA internally checks the time frame he needs.
1) Symbol; a comma-separated list of symbols that you want the EA to manage on a single instance. If empty, the EA *only* runs on the current chart/symbol
Symbol = "EURUSD, EURGBP, EURJPY, CHFJPY, GBPUSD, GBPJPY, GBPCHF, GBPAUD, USDCAD, USDCHF, USDJPY, AUDNZD, AUDUSD, NZDUSD";
2) Magic number; assigned to *each* order processed by the EA
Magic number = 3939;
3) x factor; *HEDGE* multiplier for orders.
x factor = 1.8;
4) Time setting; broker time. It is used to reset pending orders every day.
Time setting = "07:32";
5) Risk percentage; if the balance drops to this percentage, please try to recover the lost order.
Risk % = 5;
6) Risk per transaction; risk per batch automatically calculated by the EA. Under no circumstances can the EA open a lot smaller than MINLOT. If "0", the EA will use the fixed lot value obtained from the Lot field.
Risk per trade = 10;
7) Maximum number of orders allowed; Maximum quantity of *Accessories* order. These orders are special orders opened under certain conditions, namely special volatility spikes or RSI+MMA trend condition matches.
Maximum number of orders allowed = 15;
8) Maximum opening time; if the age of each opened order is higher than this value, the order will be closed. "0" means do not check the order age.
Maximum open time = 0;
9) Profit check period; in order to close a winning order, 15 million bars of the closing market need to be considered. This method *only* works if all profits are positive.
Profit check period = 3;
10) Aggressive; if TRUE, it means to consider breakouts on the H1 timeframe instead of the H4 and daily timeframes. Transaction volume increased significantly. Dangerous.
aggressive = false;
11) Use pivots; if TRUE pivots, resistance and support levels will be used to recalculate take profit for losing orders. In this case, they can close the position at a negative amount to minimize losses. Check the pivot every hour.
UsePivots = true;
12) Parameters for RSI+MMA trend condition checking.
fastperiod = 18;
slow period = 60;
selectivity=14;
13) Many; fixed value used when RiskPerTrade = 0.
Lot size = 0.01;
14) Slippage; idea slippage.
Slippage=3;
15) Electronic communication network; supports ECN accounts.
ECN=true;
16) Margin percentage; please try to reserve this margin amount before opening more orders. Losses on open trades cannot be protected against.
Margin percentage = 20;
17) Stop loss; the stop loss point is PIPS.
Stop loss = 0;
18) Trailing values apply to winning orders *only* if you have all positive profits. In other cases, the EA uses a *basket*, which will try to close as many losing orders as possible with just one winning order.
trajectory start = 20;
trailing amount = 3;
19) Take Profit; the offset applied to the profit calculated by the pivot.
Take Profit = 20;
20) All orders; if TRUE the MagicNumber will be ignored and all orders executed on the AllSymbols setting will be managed.
all orders = true;
21) All symbols; if TRUE, managed symbols will be ignored and all orders will be managed.
all symbols = true;
22) Log to file; if TRUE, log is written to file.
log to file = false;
23) Initialize the reset order; if TRUE, reset the pending order during initialization.
Initialize reset order = true;
start time = 0;
End time = 24;
now all off = false;
Friday closing time = 0;
Allow training time and force closing conditions. CloseAllNow will force *close* all orders. FridayCloseTime will force "close" all orders after this Friday's time; "0" means ignore this and keep the order.
Attachment download
📎 Charles2_1_5.mq4 (81.42 KB)
📎 Charles2_1_8a.mq4 (83.58 KB)
Source: MQL5 #10823
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •