fxDreema

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

    Error in Comparison That Should Never Happen

    Questions & Answers
    2
    6
    310
    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.
    • E
      everjn17 last edited by everjn17

      Hi' Guys,
      I am trying to edit some of my EA here but got stuck for almost a day with some stupid misscalculation.

      So, as you can see on the screenshot(SS1) i have a block that compare if distancePerc > TP_Percentage. This block never get executed as TRUE. It always falls into FALSE result.

      I am surely have some moment that it should turn into TRUE. I do the LogMessage to check and make sure that some times the distancePerc > TP_Percentage is TRUE.

      However, if i reverse the logic to distancePerc<TP_Percentage, sometimes it executed as TRUE and sometimes as FALSE. Like what it should be. It's also match with the LogMessage from those 2 value.

      The data type of both value is the same (double). Also i attach Screenshot (SS2 and SS3) so you can see my variable and constant list.

      Really hope someone can point me out to some stupidity i made. Or perhaps this is a bug?

      SS1
      SS1.png

      SS2
      SS2.png

      SS3
      SS3.png

      1 Reply Last reply Reply Quote 0
      • E
        everjn17 last edited by everjn17

        Hi' Guys,
        Here i share the EA project links which hopefully will get you better sense of what i am doing
        https://fxdreema.com/shared/N4acCy3bd

        Also, here's a youtube video i made explaining what i am aiming for and the issue i had
        https://youtu.be/2YwjV1d9d70

        Thanks in advance

        sharbati 1 Reply Last reply Reply Quote 0
        • sharbati
          sharbati @everjn17 last edited by

          @everjn17 Hello
          I did your project but no trade was made

          1 Reply Last reply Reply Quote 0
          • E
            everjn17 last edited by

            Yes since you'll need a custom indicator for it to run. However i can't share the custom indies as i have a copyright with the programmer of that indicator. You can replace the custom indicator with simple moving average crossover condition to test the EA.

            sharbati 1 Reply Last reply Reply Quote 0
            • E
              everjn17 last edited by

              Still doesn't have any clear solution for this Bug.

              1 Reply Last reply Reply Quote 0
              • sharbati
                sharbati @everjn17 last edited by

                @everjn17 Please share the indicator link

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

                Online Users

                T
                V
                M
                M
                A
                A
                R
                S
                P

                24
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors