fxDreema

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

    Dukascopy Data - Array out of range

    Questions & Answers
    3
    8
    1816
    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.
    • S
      SydneyFox last edited by

      I am getting an error when trying to backtest fxDreema EAs when using downloaded Dukascopy data.

      My EA tests on the broker/metaquotes data but not on Dukascopy data. The mt4 inbuilt EAs, MACD Sample and Moving Averages both work so I can't see that it can be a data issue. As the EA works on the metaquotes data I can't see that my EA has a 'critical error' as the journal says.

      0_1555197557192_9d72f18b-eb59-4f34-a3ed-f8335ade7438-image.png

      I have searched fxDreema for other similar errors. It appears that they are happening when using Dukascopy data. But there doesn't seem to be any explanations given?

      @fxdreema @miro1360 Do you have any explanation? Or solutions for me?

      Do any other users test with Dukascopy data? Any solutions or suggestions for me?

      1 Reply Last reply Reply Quote 0
      • S
        SydneyFox last edited by

        I have tried another EA that I made. This time not using custom indi's but still get thge same error message. The line in the code I think it's telling me where thye error is i.e. 707 is as follows:

        0_1555199219272_32bb64a1-d4dd-483d-9aa7-37a266ba5c3d-image.png

        This line of code is the same in both EAs that have the error message?

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

          the error is related to the function CopyTime() ... this function is used in the block Once per bar ...

          you can avoid the error using very simple alternative to the Once per bar block with custom code: (I tested it now on ducascopy data downloaded with tickstory and it worked for me)

          0_1555204524224_21c32839-1f58-406c-af9d-b2b4ec6eb718-image.png

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

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

            hm... i usually have divide by zero.. what might be the cause @miro1360 ? i also post my issue in the bug area.. please help to see if able to resolve? not everytime and when that happens, i usually change the date start from 20xx/01/01 to 20xx/01/05 and resolve it. but there are times no matter what, just cannot resolve..

            maybe dear @fxdreema can amend the block to miro's solution to avoid this issue altogether?

            1 Reply Last reply Reply Quote 0
            • S
              SydneyFox last edited by

              Thanks @miro1360 for your reply. Replacing the once per bar block with your custom code has fixed the error I was getting. I have another issue with it now.

              When running the EA I now get no trades taken. The only thing I have done is to replace the once per bar blocks with the custom code. When I run the test in visual mode, and the test completes, my custom indicators are not shown on the screen. Whereas when I run the test using the EA with the once per bar blocks and the test completes the custom indicators are shown on the screen.

              Test with custom code:
              0_1555306656622_037daa77-bd97-4159-95ae-ac174294a1f4-image.png

              Test with once per bar blocks:
              0_1555307885162_b4f6a9ee-261d-4498-9c67-4fb7420efc65-image.png
              This shows Spearman, Damiani, HA Candle indicators. These are in both EAs.

              Is there any reason why the change to custom code would impact on using custom indicators? What do I do next?

              1 Reply Last reply Reply Quote 0
              • S
                SydneyFox last edited by

                Also, this happens on both Dukascopy data and metaquotes data.

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

                  this should open trades:
                  https://fxdreema.com/shared/Rd6D3Txpb

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

                  1 Reply Last reply Reply Quote 0
                  • S
                    SydneyFox last edited by

                    Thanks @miro1360

                    I was able to get an EA to open trades when using standard indicators but not with custom indicators. I have now managed to get some to work which of course has led to more questions. But still not all are working?

                    Because I'm using downloaded data, say for the period 1 January 2016 to 31 March 2019. If I am using a 50 period MA then the test needs to run for at least 50 days from 1 January 2016 before the 50MA provides a calculation. I assume what I need to do if wanting to test from 1 January 2016 is to download data from say 1 January 2015 so that I have previous history for my indicators to use in their calculations?

                    What I really don't understand though is the following:

                    • When running a test from 1 January 2016 using a custom indicator that requires say 50 days of data to make a calculation. The tester shows no transactions for the whole period of the test even though the indicators should meet the condition for a trade in say August 2016 (and many more after this date).
                    • But if I run the test with a starting date of say 1 July 2016 then the August trade (and ones after this date) are taken by the tester.
                    • Why should it matter what date the test is run from?
                    • And it doesn't necessarily work if I start the test from exactly 50 days after 1 January 2016 or for the next X number of days but then starts working when I start the test from some undefined (seems to be undefined to me) date after 1 January 2016.? Is there any logic I should be looking at to see why this is the case?
                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post

                    Online Users

                    M
                    S
                    T
                    O
                    G
                    B
                    A
                    P
                    I
                    M
                    M
                    J
                    T
                    S
                    T
                    M

                    34
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors