Generate a random chart
-
I think it would be nice to backtest EAs on a completely random chart. A chart that by design does not follow technical analysis rules or anything else we see on the forex charts.
If the EA "works" in a 100% random environment, one would be certain it has no real trading edge as the profitability would be just a tricky money management scheme. If EA works in real chart but not in random chart, that would be a promising sign.Do you have any ideas how to generate such a random chart for mt4/mt5? Perhaps it could follow the daily volatility cycle (13-hour ATR) but otherwise the candle opens, closes and wicks would be random...
-
generate data in excel, save as .csv
import these data into metatrader (Tools - History center - Import)
consider some dependencies (close[1] == open[0]) -
Very interesting topic. I made some studies on this matter a few months ago. But I did not finish this work; the procedures are long and take a long time.
However, I believe it is a very promising field of research.
I attach two links, from which I extrapolated the basic material from which to start to move the first steps.
I hope they can be useful.https://www.forexfactory.com/showthread.php?t=298216
https://www.forexfactory.com/showthread.php?t=230828 -
Thank you both! I'm going to build something up today once I get home from my real job lol
I think mt5 has improved the custom symbols function, it should be easier. I am thinking of just copying the eurusd m1 data, and then just "flip" some candles over, bull to bear and vice versa, based on some random sequence. Spreads, tick volumes, volatility, gaps, dates will all stay correct, just the direction will be random, onwards from an achor point like 1.1.2010
-
What you hypothesized could be a good idea, as a starting point.
However, if I can afford it, I would also take into consideration the volatility parameter (to be valorised in random mode).
Keep me updated on your progress (I will do the same); I would be very pleased. -
Uhh working with 3 million candles (with all the factors that makes some 20 million data points) isn't as easy as I thought lol

I'm making good progress, though...
e: Getting there... wow this is interesting
-
HERE WE GO:

For some reason I couldn't get the gaps working, there was a gap on every candle... Going without them for now
Here's a link to google drive, couldn't put the data here: [use new link below]
It still has some problems with minute gaps, but the general concept works
-
Very, very interesting!
You did a great work, which will be useful to many.I, very modestly, I attach Excel files in which I inserted the "random" variable related to volatility.
https://drive.google.com/open?id=1HTEzUPAg5weh1kM0Vx_qV4NoE7DWs9p1
-
that's good idea! hope to put my ea into such test too. Can this be achieved in mt4?
-
@vnpython-0
I have never tried with mt4, but seems possible - there's a history center if you press f2, and I found the import and export buttons

-
I revisited this project today, and noticed there were some stupid logical mistakes in the data manipulation..
Made a better one! In this dataset on EURUSD 2009-2019 M1 OHLC candles,
every 2nd one-minute candle is flipped upside down. All gaps are removed. As a result, the weekly chart starts quickly deviating from real EURUSD. Backtest reports 98% accuracy.
Because significant m1 candle moves don't occur in binary fashion (0,1,0,1...), the resulting price movement is pseudorandom.Why use this? If my EA works well in both real EURUSD and this modified one, it is a bad signal - my EA probably just exploits some flaw in the backtester.
Import M1 OHLC bars: https://drive.google.com/open?id=1SuxvO2sjLPu0dVnwyVfauG2azC7r0cV8


-
@roar Great thread and idea!
AND most importantly... it follows that -there is order- in the market.
After seeing backtests where unreliable, at least for my kind of approach (tf used, etc), I moved to forward tests. In 4 months, I ended up working only on two EAs, for the most part.
Even if conditions change from month to month, week to week, day to day, hours in a day, news, etc, I would say that watching the charts and how the EA performs, tweaking, etc, I learned a lot without me wanting to necessarily, lol... and slowly boils down to some particulars. Will see what comes out from this.
But, yes, an EA not working on random, means "it" gets (or the EA creator, lol
) some particulars.
And as building approach, I have put the Money management aside, to be included when the EA is already profitable, so I know it has good strategy. The added MM would only make it even more profitable, so it's an add on (in my view). -
@cpxiom I have the same methodology - money management shouldn't be the critical part, trading logic comes first!
-
@roar
Even though, my knowledge in the domain is very poor, i saw your topic and i couldn't avoid making the link with a formula i've seen recently about reproducing sort of chaos, it is :
X=4.x(1-x) with x between 0 and 1, both excluded, and replacing x by the results in the next operation, and
so on, as a mathematical series.
Not sure you can reproduce a 100% random chart, when even this exemple has his rule, it would give something crazy. I think youll be able to use this pretty simple equation in excel without any problem.