fxDreema

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

    Error Parabolic "array out of range"

    Questions & Answers
    4
    12
    6649
    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.
    • M
      mfuetterer last edited by

      Hi,
      I wanted to use the parabolic indicator, but get an error at runtime:

      2017.01.18 19:26:11.140 2016.01.03 23:00:01 Testing pass stopped due to a critical error in the EA
      2017.01.18 19:26:11.102 2016.01.03 23:00:01 Parabolic EURUSD,H1: array out of range in 'Parabolic.mq4' (156,43)
      2017.01.18 19:26:08.762 Parabolic inputs: InpSARStep=0.02; InpSARMaximum=0.2;
      2017.01.18 19:26:08.762 Custom indicator Parabolic EURUSD,H1: loaded successfully

      Could this be fixed?

      Mic

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

        This problem comes from some indicator I guess. Last month I was working on a MQL4 to MQL5 converter so I now understand indicators a liiiitle bit better. Not very much better 🙂 So while I was testing different indicators I noticed something. That error "array out of range" would appear in MQL5 indicator if anything is wrong with the buffers inside OnCalculate(). But the same indicator could work in MQL4 without problems when there is no #property strict. It seems that in MQL4 you have the option to set the code as strict mode or not, while in MQL5 you don't have this option - it's always strict.

        So, if your indicator has #property strict you can try how it will work without it. Otherwise you must fix the problem in the code.

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

          ... and how can I set it to strict?

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

            Remove #property strict if exists. If it doesn't exist or it still gives that error, then the code must be fixed

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

              I'm not aware having coded #property strict.
              ... and when you say "code needs to be fixed" you are talking about your code 😉 ?

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

                Parabolic.mq4 - what is this, indicator from internet or EA made with fxDreema?

                Ok, I guess it is some EA. Then at least tell me which of your projects we are talking about. Just like that I can't even recognize this as an EA, how can I say what is located at row 156 position 43

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

                  Just used the built in indicator:

                  0_1485082897349_2017-01-22 12_00_48-Facebook.png

                  in a simple EA:
                  https://fxdreema.com/shared/WskYoZHD

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

                    do you have whole history in tester? try it with another metatrader (firstly download history, restart metatrader and try it again)

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

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

                      Well, I don't see arrays around row 156. This is somewhere in the middle of the OnInit() function, which is mostly the same for all generated EAs.

                      Are you sure that this error was produced by EA made with fxDreema? If yes... if it happens again, go to the row that is reported in the source code file (for example row 156), copy some code around this row and give it to me. I just can't find anything suspicious at this row right now.

                      I also put that EA for backtest (not profitable at all) and it finished without problems.

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

                        It seems to be an issue of data.
                        It works with controllpoints not with full dukascopy data.

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

                          Well, error "array out of range" normally means some problem in the code. But again, I can't understand in which code this error appears 🙂

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

                            Remove #property strict if exists.

                            Fixed it for me, many thanks.

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

                            Online Users

                            R
                            S
                            A
                            B
                            N
                            M
                            A
                            T
                            V
                            M
                            A
                            A
                            R

                            22
                            Online

                            146.7k
                            Users

                            22.4k
                            Topics

                            122.6k
                            Posts

                            Powered by NodeBB Forums | Contributors