fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Generate a random chart

    General Discussions
    6
    14
    5295
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • roar
      roar last edited by

      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...

      Need small help? Tag me in your post
      Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

      B 1 Reply Last reply Reply Quote 0
      • M
        miro1360 last edited by

        generate data in excel, save as .csv
        import these data into metatrader (Tools - History center - Import)
        consider some dependencies (close[1] == open[0])

        Between trading and gambling is a very small gap, be careful.

        1 Reply Last reply Reply Quote 1
        • B
          Bigape @roar last edited by

          @roar

          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

          1 Reply Last reply Reply Quote 1
          • roar
            roar last edited by

            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

            Need small help? Tag me in your post
            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

            B 1 Reply Last reply Reply Quote 0
            • B
              Bigape @roar last edited by

              @roar

              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.

              1 Reply Last reply Reply Quote 0
              • roar
                roar last edited by roar

                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

                Need small help? Tag me in your post
                Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                1 Reply Last reply Reply Quote 0
                • roar
                  roar last edited by roar

                  HERE WE GO:
                  0_1549302132153_79c02e83-0299-4065-864c-7a81b2c3ee71-image.png

                  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

                  Need small help? Tag me in your post
                  Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                  B 1 Reply Last reply Reply Quote 0
                  • B
                    Bigape @roar last edited by Bigape

                    @roar

                    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

                    1 Reply Last reply Reply Quote 1
                    • V
                      vnpython 0 last edited by

                      that's good idea! hope to put my ea into such test too. Can this be achieved in mt4?

                      roar 1 Reply Last reply Reply Quote 1
                      • roar
                        roar @vnpython 0 last edited by

                        @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 😄
                        0_1550261298747_17110705-7df8-4f51-95d6-71b6b0773795-image.png

                        Need small help? Tag me in your post
                        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                        1 Reply Last reply Reply Quote 0
                        • roar
                          roar last edited by roar

                          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
                          0_1571043668980_ed6f9c08-e267-4349-9dbc-1c97fe1d5673-image.png
                          0_1571044694466_6894a4be-82ea-4ed2-bffd-12216243376b-image.png

                          Need small help? Tag me in your post
                          Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                          C 1 Reply Last reply Reply Quote 1
                          • C
                            CPxiom @roar last edited by

                            @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).

                            roar 1 Reply Last reply Reply Quote 1
                            • roar
                              roar @CPxiom last edited by

                              @cpxiom I have the same methodology - money management shouldn't be the critical part, trading logic comes first!

                              Need small help? Tag me in your post
                              Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

                              S 1 Reply Last reply Reply Quote 1
                              • S
                                seb 0 @roar last edited by

                                @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.

                                1 Reply Last reply Reply Quote 1
                                • 1 / 1
                                • First post
                                  Last post

                                Online Users

                                E
                                M
                                C
                                K
                                T
                                K
                                D

                                28
                                Online

                                146.6k
                                Users

                                22.4k
                                Topics

                                122.6k
                                Posts

                                Powered by NodeBB Forums | Contributors