Ilan 1.6 Dynamic HT - MetaTrader 5 Expert | MT5 EA Download - MetaTrader 5 Resources








The underlying algorithm of Ilan Dynamic 1.6 HT is simple. It is based on price averaging, with the number of each transaction gradually increasing.
For example, if after opening the first long position, the price drops and exceeds a certain pip range, a new long position with greater volume will be opened.
Therefore, Yilan Power's average entry price remains close to the current market price. So just wait for the price to fall back slightly and take profits to close all open positions. The overall chart of entries executed by Ilan 1.6 Dynamic corresponds to this screenshot of the MetaTrader 5 strategy tester:

As you can see, the price went against the three buy positions, but after a small retracement, all three positions were closed with substantial profits. The screenshot also shows the take profit level (green horizontal line) and stop loss level (red horizontal line).
The Expert Advisor dynamically calculates the average price level based on the price range between the highest and lowest price of the last few bars range. The word "dynamic" in its name points to this fact.
In addition to taking profits, Ilan 1.6 Dynamic allows the use of classic stops, trailing stops, exits by time, exits by CCI indicator and exits by specified asset levels for all trades.
Ilan 1.6 Dynamic test results can vary significantly depending on the selected time frame, test period, instrument, broker and initial conditions.
Therefore, the EA needs to thoughtfully choose the parameters and markets it trades. Still, even over a short history, you can get some consistent results by using the default settings. The following is a typical equity and balance chart generated by the Expert Advisor:


Warning: Yilan 1.6 Dynamic's floating profit/loss or equity may differ significantly from its balance, which is reflected on the chart. If the price moves without a rollback, its equity will fall and eventually, this trading strategy may result in a margin call and destroy your deposit . Only work with the Ilan 1.6 Dynamic when flat. Use its lot index with caution!
Ilan 1.6 Dynamic is in optimal configuration by default. Most of its parameters are not used in this mode. However, you can customize the options.
Use the table below to configure the parameters to your liking.
Test mode. Best tools and timelines.
Ilan 1.6 Dynamic was created primarily to profit from short-term price movements. Its best time frame is the 15-minute chart (M15). Default settings apply to 5-digit quotes. The EA supports the following modes of testing:
Ilan 1.6 Dynamic's algorithm has been successfully tested in both normal and random delay modes.
Recommended symbols
Ilan 1.6 Dynamic is recommended for all currency pairs with long-term flat (no trend) periods. Good currency pairs include EURUSD, USDJPY, GBPUSD, USDCHF, EURCHF and other major currency pairs. The settings of the EA are optimized for 5-digit quotes. If you want to use the EA on 4-digit pairs, first reduce the following parameters tenfold:
How to compile an EA and make it work (Important!)
Ilan 1.6 Dynamic actively uses order grids and personal position management.
Therefore special virtualization is required which allows working in a MetaTrader 5 environment similar to MetaTrader 4. To do this, it uses calls to HedgeTerminalAPI library functions, working in the environment provided by the library. Read the article " Two-way trading and position hedging in MetaTrader 5 using the HedgeTerminal API, Part 1 " to learn how to use this library. If you want to modify the trading logic of the EA, read this article to understand how the EA code works.
Before starting, you need to download the Hedge Terminal API library on your computer. After that, copy the software module used by the Expert Advisor to your computer (attached). Below are the details of these modules.
Ilan 1.6 Dynamic manages multiple one-way positions at once. All these positions are displayed in MetaTrader 5 as a net position. In order to easily manage the EA's positions and understand its trading status at each point in time, you should also install the demo panel hedging terminal . After startup, it will display the Expert Advisor's positions as follows:

For more details, read the article Two-way trading and position hedging in MetaTrader 5 using the HedgeTerminal API, Part 1 .
Attachment download
📎ilan_1_6_dynamic_ht.mq5 (27.97 KB)
📎 drawhedgeposition.mqh (6.64 KB)
📎 environment.mqh (11.2 KB)
📎 testertable.mqh (5.38 KB)
📎 tradestate.mqh (4.58 KB)
📎 prototypes.mqh (15.32 KB)
📎 indicators.mqh (7.04 KB)
Source: MQL5 #12220
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •