fxDreema

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

    Question to Formula Results and digits output

    Questions & Answers
    2
    3
    872
    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
      ezzakt last edited by

      Hi there,

      at the moment I am working on an EA where I do many formulas, like Object_1 Price Level 1 - Object2_ Price level 2 or whatever....

      The result in the Formula is a digit number. So like 0.0015
      Now its all working fine and I normally take this number and multiply it with 1000 or 10000 or whatever needed to get the right pip count here. This solution is not really good as if I multiply it to work with EUR/USD 5 Digit, this will not work on a yen pair on the same broker.

      So until now I helped myself by printing values on the cart for each pair to define them in the settings if necessary.

      For sure, you know a better way for me to do this, right ? 😉
      So it will adapt itself to all pairs. Not sure how to involve the point format here....

      Thanks
      Andy

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

        If you are aware of MQL4
        http://fxdreema.com/documentation/colle ... 4/pipvalue - this function is to make the EA to work the same way on 4 digits and 5 digits broker. Search the forum for more info.
        http://fxdreema.com/documentation/colle ... ql4/topips - this converts something like 0.0010 to 10.
        http://fxdreema.com/documentation/colle ... 4/todigits - this converts 10 to something like 0.0010.

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

          Not really aware but the information you posted should be enough to get it done.

          Thanks as always, cheers

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

          Online Users

          E
          H
          R

          12
          Online

          146.7k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors