Open Source Renko EA for Metatrader 5
Several years ago, I decided to start an open-source EA (Expert Advisor) project to facilitate automated trading on various renko charts. The project is FREE and open-source, so other traders can help tweak the trading robot and submit improvement ideas.
Please note that you will need a robust renko charting add-on for the 5th version of Metatrader. You can download the Ultimate Renko charting software from my website at https://www.az-invest.eu/ultimate-renko-indicator-generator-for-metatrader-5. This version already ships with the latest version of the EA's source code, so you don't need to worry about grabbing it from GitHub, installing the SDK, and compiling the EA. Additionally, you have access to standard renko charts as well as all of the exotic variations.
Alternatively, you may use a different renko solution, but you will need to modify the source code of the EA accordingly. The complete source code for the project is available on my GitHub page.
How does this renko EA work?
With prerequisites of the way, we can dive in and explore the EAs features. For the main Renko trading algorithm, I decided to go with the ever-popular entries and exits after a given number of renko bricks. This particular way of trading renko charts gives positive results out of the box. I've tested on my favorite Point Original Renko (PointO) chart.
However, this is not what we want since it is common knowledge that stop & reverse systems are faulty by design. They will only work well in strong trending markets.
Let's review the basic entry and exit conditions for the trades.
We have two inputs that control this, plus the "Trading mode" input that permits the opening of only selected "Buy" or "Sell" orders, as well as the default condition for both "Buy & Sell" orders.
The first input (Open signal confirmation bars) controls the entries while the second controls the exits. The default settings of "1" and "1" will open a trade after the first renko closes in the opposite direction and close it when the first opposing renko prints.
Of course, we can freely change the inputs to "2" and "1", so the EA trades after a renko reversal signal is confirmed by two bars going in the same direction and closes the trade after the first reversal renko. This limits the EA from trading on the PointO chart when the renko bricks get printed side-by-side.
How do we determine the correct entry & exit conditions?
The only way is to analyze a given renko chart and check for the average renko trend length, congestion periods (ranges), market bias, and the overall market structure. The best candidates for renko trading are assets that show trending characteristics.
I'll use the hybrid renko chart to illustrate that the EA can trade on any renko variation.
By looking at the intraday price action on this EURGBP chart, we can quickly see that a three-bar confirmation signal will suffice and that the pair is clearly in a downtrend. Now we need to check the 4-hour chart to check for the possible uninterrupted range to the downside, and we can set the EA inputs to the following:
The price range of three bars is around five pips (50 points), and the average price range of a renko trend is around twelve pips (120 points). I decided to set the stops accordingly.
Can we make things better?
The EA also offers a trade management feature. We can leverage a trailing stop that can "kick in" when a trade is in profit by a given amount of pips.
We can also set the desired trading hours and optionally instruct the EA to close the trade when the "End trading" time comes. This feature can come in handy when trading some exchange-traded instruments, and we don't want to take on the additional risk of holding overnight.
Using the built-in filters
We can utilize several filtering conditions to optimize the performance of the trading robot. These include up to three moving averages and the super trend channel.
Special filters can be applied to entries and exits. They are covered in "Filtering entries and exits of the Renko EA".
Comments
Post a Comment