fxDreema

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

    Custom MQL Code Round Function

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

      Hi,

      If you don't mind I have a beginner question.

      I am trying to calculate 1.618 Fibonacci Time Extension of last "n" period candles highest and lowest price times.

      Variable A = Highest Price Candle ID
      Variable B = Lowest Price Candle ID

      Var C = Var A - Var B ( A>B)

      Var D = Var C * 1.618 (calculated with formula window)

      Var E = round (Var D) --> I want to round Var D value to nearest integer. For this step I think I must use "Custom MQL Code Module"?

      I tried "E = MathRound (D);" code in Custom MQL Code window but i got error messages like this;

      Compilation errors
      'Double' - undeclared identifier
      'E' - undeclared identifier
      'E' - some operator expected
      'D' - undeclared identifier
      'D' - some operator expected

      https://fxdreema.com/shared/kqoOXuFcc

      Please help 😕

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

        One more case when someone is using those Terminal Variables. I don't know what to do with them anymore 🙂

        Do it like this - http://prntscr.com/a8e1ft Terminal Variables are NOT those blue Variables.

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

          Thank you very much

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

          Online Users

          Z
          D

          10
          Online

          146.9k
          Users

          22.4k
          Topics

          122.6k
          Posts

          Powered by NodeBB Forums | Contributors