fxDreema

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

    Odd bug

    Bug Reports
    2
    3
    535
    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.
    • W
      William29 last edited by

      So I was working on the way to get monday first 8 hours high and low as a variable.
      I all seemed to work until i notice very bizzare bug.

      So the ea is simple rather, it filters days and gives it ID, then it filters hours and gives it id too, then a bunch of if functions to determine how many candles there were from Monday open. So all works until now.
      When I try to get the values if I do not make it

      Start_ID = ID_Count - 1;
      End_ID = ID_Count - 2;

      candle IDs are correct but variables give completely bizarre out-of-the-range numbers.

      but if you'd only make it into

      Start_ID = ID_Count ;
      End_ID = ID_Count;

      it works as intended.
      It will make more sense when you take a look for yourself.
      I honestly don't understand where the problem is coming from.

      https://fxdreema.com/shared/fuNSYv3K

      M 1 Reply Last reply Reply Quote 0
      • W
        William29 last edited by

        Never mind, I figured it out.
        Apparently when setting the modified variables the start and then end goes backwards, meaning you need to start with the end and end with start values which is odd but make sense since it's how it works.

        1 Reply Last reply Reply Quote 0
        • M
          miki @William29 last edited by miki

          @william29 At start Start_ID = ID_Count - 1 = 0 (current candle);
          End_ID = ID_Count - 2 =-1(candle doesn't exist);
          I think you only complicated your life with that system.
          If you are interested in the min and max on Monday you just have to take them once and keep them in a variable.

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

          Online Users

          B
          A
          T
          M
          E
          C

          15
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors