Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Ondarox EA - A Simple Breakout Robot (Ondarox EA - A Simple Breakout Robot)

author EAcpu | 3 reads | 0 comments |
This is my first post on FF, so here are some things I wanted to share. --Feel free to skip.

I started trading in late 2012 and joined FF in early 2013. I love programming and since then I have coded and backtested countless trading ideas created by FF and myself. Of all the EAs I've written, I've learned that most perform very well until they don't, meaning they are perfectly suited to the market conditions at the time, but as soon as those conditions change, they fall apart. Many others look great on paper, but when faced with real spread slippage takes away all chance of profit.

I'm by no means a professional trader and can't claim to be a profitable trader, but now I don't blow up and I've been learning more about my psychology and trading. Here are some things I learned during my short journey.

  1. In theory, my risk tolerance is much higher than live trading. While they can be profitable in the long run, I've stopped some systems early because I couldn't stomach the losses.

  1. For me, simulated trading cannot compare to real trading. A 1% loss on a real account affects me more than a 10% loss on a demo account. Therefore, I only use a demo account to test the logic of the system, and a very small real account for actual forward testing.

  1. As attractive as they are, making money on lower, rapidly changing time frames is much more difficult. I think the time frame of 1 hour and above is longer. Most of the systems I test are 1 hour because I haven't completely lost the psychological need to make at least a few trades per week.

  1. I will never be a manual trader. I don't have the patience or discipline to sit for hours at a time. Within the first hour I would start trading more out of boredom than any other reason.

  1. I am obsessed with checking my open trades. I find myself constantly checking my system for open transactions.

  1. If your system is logically sound, do not overturn it by closing positions or adjusting trades. I have closed automated trades early many times, and while it seemed like the right thing to do at the time, most of the time, the results would have been better if I had left it alone.

  1. The simpler the system, the better. I get the best results using very few indicators. Most of the systems I've tested lately involve fractals, ranges, and trend lines.

  1. I really need to break my dependence on MT4 and take the time to learn Python. I currently code and test all my systems on MT4, although I send all trades via file to a Python script, placing them on Oanda 's FXTrade platform. This allows me to make any size trade, no matter how small. It would be ideal to eliminate my existing patchwork system and move it all to Python. Furthermore, you never know when Metaquotes will give up on MT4 entirely.


Why choose Ondale?
In real life, I'm a bartender, so "On the Rocks" makes sense. Also, I didn't want to spend too much time coming up with some catchy name that no one would really care about.

About EA
The EA I share is a range breakout system whose goal is to catch the trend without predicting when the trend will stop while minimizing losses. Open a position based on the highest or lowest price within a given quantity bar. Stop losses and targets are hidden from the broker and are managed by various user-defined options. So far I have had the best results using ATR based stops. In my tests, the system's average win rate (depending on the settings) was between 30-40%, but the losses were much smaller than the wins.

The most important settings in the EA are the high/low extreme periods . This sets the bar range that the EA uses to open trades. One setting does not fit all currency pairs. EURUSD responds well to the 25 period, while I find GBP/USD responds better to the 36 period. Also keep in mind that 25 periods on the 1 hour chart is the same as 100 periods on the 15 minute chart because there are 4 bars per hour.

I'm not a fan of the traditional Martingale system, but have found that in a system like this one, where consecutive losses are rare, slightly increasing the trade size for each loss to the maximum amount of risk can often reduce overall drawdowns and sometimes increase profits.

I have been testing this system live on a small account since December 15, 2017 and after 22 trades I am currently down 11%. About 7% of that was due to some coding errors I found, so realistically I should be down about 4%. Compared to my backtests, the system performed exactly as expected, so I wasn't worried. I have been running with an initial risk of 3%, increasing the risk by 0.7% with each loss, up to a maximum risk of 5%. Since this system uses trailing stops, the chance of a 5% loss is rare. The largest loss I encountered was 4.38%, while the average loss was 2.25%. The highest win rate so far is 17.7% and the average win rate is 8.48%.

Backtest <br> Below are some backtests I performed using EURUSD's settings file. I'm using TickDataSuite with Dukascopy data and have 99.9% modeling quality for real spreads and random slippage. The tests were conducted from January 1, 2010 to February 1, 2018.

higher stakes testing

Attached picture (click to enlarge)
Click to Enlarge

Name: EU-NoMarty.png
Size: 64 KB

Attached picture (click to enlarge)
Click to Enlarge

Name: EU-Marty.png
Size: 66 KB


lower risk testing
Attached picture (click to enlarge)
Click to Enlarge

Name: EU-NoMarty-Conservative.png
Size: 63 KB

Attached picture (click to enlarge)
Click to Enlarge

Name: EU-Marty-Conservative.png
Size: 66 KB


Please don't trust my results!
Do your own testing and share any good setup files you come up with!
Just because something looks good in backtests, never assume it will continue to be profitable in the future!

EA setup instructions

  1. Trade once in each direction?
    If set to true, the EA will only open a trade in the given direction. If the previous trade was short, the next trade will be long.

  1. High/Low Extreme Periods <br> Trading begins when a bar reaches its highest or lowest point in a given period. This is where you define the period in question.

  1. Using NRTR ATR Trailing Stop?
    Use the "NRTR_ATR_STOP" indicator as trailing stop.

  1. Use BB Stop to trail your stop loss?
    Use the "BB Stops (New Format) 1.3" indicator as trailing stop.

  1. Using Parabolic Trailing Stop?
    Use the "Parabolic_Mod" indicator as trailing stop.

  1. Use three-bar trailing stop?
    Use the lowest or highest price of the previous three bars as trailing stop.

  1. Exit on hard stop?
    Exit the trade with a set stop loss defined in pips.

  1. Exit hard target?
    Exit trades based on set goals defined in points.

  1. Exit at high/low extremes <br> Exit trades at the highest or lowest point during a specific period.

  1. Using average historical range as target? stop?
    Exit trades are made as a percentage of the past maximum trade range for a given amount.

  1. Maximum total risk with martingale <br> Maximum total risk allowed when using martingale

  1. Calculating losses using Martingale?
    Adjust risk on next trade after loss

  1. Increase the risk of loss?
    If set to true, the risk of the next trade after a loss will be increased by the given amount. Risk is reduced when set to false.

  1. Use Martingale to win?
    If set to true, the risk of the next trade after a win will be increased by the given amount.

Although I only use the NRTR ATR indicator in live trading, I have included a few other options in the settings, so below are the indicators that these indicators will use. The Parabolic indicator below is the same indicator included in MT4, I just modified it to show whether the points are upper or lower.

Final Thoughts <br> I spent a lot of time on this and am not willing to share my source code at this time. I also set an expiration time in the code to prevent others from selling my work. I will update expired information before it expires. I have no intention of selling it and there are no restrictions on whether it can be used on a demo account or a real account.
If you disagree with any of it, please don't use it and move on.

EU-NoMarty.pngEU-Marty.pngEU-NoMarty-Conservative.pngEU-Marty-Conservative.png
EU-NoMarty.pngEU-Marty.pngEU-NoMarty-Conservative.pngEU-Marty-Conservative.png
EU-NoMarty.pngEU-Marty.pngEU-NoMarty-Conservative.pngEU-Marty-Conservative.png
EU-NoMarty.pngEU-Marty.pngEU-NoMarty-Conservative.pngEU-Marty-Conservative.png
EU-NoMarty.pngEU-Marty.pngEU-NoMarty-Conservative.pngEU-Marty-Conservative.png
EU-NoMarty.pngEU-Marty.pngEU-NoMarty-Conservative.pngEU-Marty-Conservative.png

Attachment to original post (6)

📦 Summary of post attachments (3)

Below are all the files (3) shared in the reply.

Verification code Refresh