fxDreema

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

    Formula with variable - EA gives up

    Bug Reports
    2
    8
    1539
    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.
    • G
      GrowTru last edited by

      I've been trying to make this work with a longer EA obviously but narrowed it down to this which still doesn't work.

      The EA works perfectly for a a few bars but then stops for no reason, I haven't touched anything.

      Thanks in advance for your help.

      http://s28.postimg.org/x7ds821k9/formula.jpg

      1 Reply Last reply Reply Quote 0
      • G
        GrowTru last edited by

        Also if I add a condition afterwards that checks if the variable "result" <1 (for example). I can watch the number as it happens on the chart drop below 1 but it never passes that block.

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

          I don't know what happened to be honest. I got similar reports before, but I don't have any evidence that something is wrong with the EA. "Once per tick" is not needed by the way. Do you have some error messages in the log or something?

          1 Reply Last reply Reply Quote 0
          • G
            GrowTru last edited by

            Thanks for your reply, I didn't think of that. Error is shown below.

            Does this mean it's trying to divide nothing so throws the error? If I added an adjustment '+1' to the formula could this make it carry out a calculation even when it's trying to divide 0's...

            http://s13.postimg.org/z2lbax6b7/Untitled2.jpg

            1 Reply Last reply Reply Quote 0
            • G
              GrowTru last edited by

              Tried +1..... it didn't work

              1 Reply Last reply Reply Quote 0
              • G
                GrowTru last edited by

                Ok so I've fixed that problem by adding a condition before the formula that checks the value >0. So that stops it from crashing.

                My next issue is when I get a result from the formula, say '0.7' which is then printed as text on the chart. I've then added another condition saying 'if terminal variable "result" <0.8' but it won't pass. I'm using right operand, value is numeric 0.8

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

                  No no no no no, not Terminal variables again. Those variables are not those Variables. Terminal variables are something completely different. The short suggestion is - don't use them. To use a Variable in Condition, go to Value -> Numeric (or Text, or whatever), right-click on the field and select the Variable. Again, Terminal variables are NOT the same as those blue Variables.

                  1 Reply Last reply Reply Quote 0
                  • G
                    GrowTru last edited by

                    Ahhhhhhhhhhhhh, thankyou your help is greatly appreciated and all is working.

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

                    Online Users

                    R
                    S
                    M
                    R
                    E
                    M
                    P
                    C
                    J
                    V

                    26
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors