fxDreema

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

    array out of range error

    Questions & Answers
    4
    10
    416
    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.
    • T
      tec.nacks last edited by

      what is wrong with the platform? newly exported EA are not responding to constant input value changes in real-time the EA freezes anytime this happens..populating this error type: array out of range in '65391-18647.mq4' (296,11)
      WHY?

      you can sample check with the project

      https://fxdreema.com/shared/wN5dnBzrc

      T 1 Reply Last reply Reply Quote 0
      • l'andorrà
        l'andorrà last edited by

        I know the admin is modifying the platform code because of an error I found some days ago. I have no idea if it is related to your issue or not. You'd better contact him to let him know just in case.

        (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

        (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

        (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

        1 Reply Last reply Reply Quote 1
        • M
          MT4Nutzer last edited by

          I have the same problem.

          1 Reply Last reply Reply Quote 0
          • T
            tec.nacks @tec.nacks last edited by tec.nacks

            @tec-nacks @l-andorrà I've reached out to him already but no response.... if you possibly can, pls help do

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

              Hi FXDreema team, @fxDreema
              I'm encountering an issue with an EA generated by FXDreema, specifically an "array out of range" error in the OnChartEvent, OnTimer function.
              This seems to happen when I switch timeframes, and I believe it’s related to the generated code rather than anything I’ve added.
              Here’s the relevant code:

              void OnChartEvent(
                  const int id,         // Event ID
                  const long& lparam,   // Parameter of type long event
                  const double& dparam, // Parameter of type double event
                  const string& sparam  // Parameter of type string events
              )
              {
                  //-- write parameter to the system global variables
                  FXD_ONCHART.id     = id;
                  FXD_ONCHART.lparam = lparam;
                  FXD_ONCHART.dparam = dparam;
                  FXD_ONCHART.sparam = sparam;
              
                  //-- run blocks
                  int blocks_to_run[] = {39,52,60,62,64,66,68,70,72,74,76,78,80,81,85,86,88,90,92,94,96,101,115,127,131,137,139,142,143,150,156,163,165,177,185,187,191,202,213,221,226,229,231,237,249,251,255,258,263,269,282,284,290,301,303,309,320,322,334,343,349,356,359,367,374,381,419,425,463,465,468,469,470,471,472,476,477,570,572,573,599,600,602,604,606,608,610,611,612,617,618,619,623,624,625,629,630,633,634,635,639,642,643,662,668,669,672,673,674,678,679,682,684,686,688,690,692,693,694,698,699,704,705,744,745,754,772,774,776,778,780,782,784,786,788,828,830,832,834,858,861,862,863,864,889,892,895,897,903,941,963,965,969,971,973,976,978,980,992,997,1015,1017,1019,1025,1026,1028,1031,1033,1046,1066,1069,1082,1098,1153,1159,1163,1167,1171,1176,1177,1182,1188,1189,1190,1191,1196,1197,1198,1199,1204,1205,1206,1207,1211,1212,1213,1214,1219,1240,1242,1270,1271,1272,1273,1279};
                  Print(ArraySize(blocks_to_run));
                  Print("Size of _blocks_: ", ArraySize(_blocks_));
                  for (int i=0; i<ArraySize(blocks_to_run); i++) {
                      _blocks_[blocks_to_run[i]].run();
                  }
              
                  return;
              }
              
              

              To debug, I added some print statements:

              Print(ArraySize(blocks_to_run)); returns 205, which seems correct.
              Print("Size of blocks: ", ArraySize(blocks)); returns 1301 normally, but when I switch timeframes, it drops to 0, and that’s when the “array out of range” error occurs.

              I’m using MetaTrader 5. Could you please take a look and suggest a fix or workaround?
              Thanks for your help!

              T 1 Reply Last reply Reply Quote 0
              • T
                tec.nacks @alidavoodi last edited by

                @alidavoodi the issue is from the admin... probably during a tweak to the platform

                alidavoodi 1 Reply Last reply Reply Quote 0
                • alidavoodi
                  alidavoodi @tec.nacks last edited by

                  @tec-nacks
                  Thank you

                  Do you know when this happened
                  Because I don't think it happened until yesterday...

                  T 2 Replies Last reply Reply Quote 0
                  • T
                    tec.nacks @alidavoodi last edited by

                    @alidavoodi yea, it started yesterday

                    1 Reply Last reply Reply Quote 0
                    • T
                      tec.nacks @alidavoodi last edited by

                      @alidavoodi it has been fixed..admon responded

                      working now ..tested

                      alidavoodi 1 Reply Last reply Reply Quote 0
                      • alidavoodi
                        alidavoodi @tec.nacks last edited by

                        @tec-nacks Thanks for letting me know
                        I'll test it now.

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

                        Online Users

                        P
                        B
                        S
                        S
                        T
                        F
                        I
                        S
                        S
                        G

                        26
                        Online

                        146.6k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors