fxDreema

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

    WMA of variables

    Questions & Answers
    2
    5
    258
    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.
    • Zereleth
      Zereleth last edited by

      Hello,

      I'm just curious if it's possible within FxDreema to make a WMA that operates using a variable rather than price. In this instance I want the WMA to calculate the average of a variable rather than the price over a given period.

      In function I am trying to create a variation on a HMA but I am just wondering if FxDreema has this functionality

      Pine equivalent would be "variable1 = wma(variable2, variable3)" with variable2 being the values averaged and variable3 being the time period.

      Thank you for the help.

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

        https://www.mql5.com/en/code/77

        You need to import this library (using a custom block), then you can call the LinearWeightedMA() function on your variable, assuming its an array.

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

        Zereleth 1 Reply Last reply Reply Quote 0
        • Zereleth
          Zereleth @roar last edited by

          @roar Is this functional for mt4?

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

            On mql4 its actually a bit easier, because you can use iMAOnArray() without importing anything: https://docs.mql4.com/indicators/imaonarray

            So it would be something like this
            https://fxdreema.com/shared/TUPEbGVXd

            Need small help? Tag me in your post
            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

            Zereleth 1 Reply Last reply Reply Quote 0
            • Zereleth
              Zereleth @roar last edited by

              @roar said in WMA of variables:

              iMAOnArray()

              Thank you for the help, so would this be functional?

              https://fxdreema.com/shared/WxJFGiUod

              Defining both values for variable2 and variable3 in different blocks then using them in the final WMA

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

              Online Users

              C
              M
              M
              F
              L
              F
              F
              E
              K
              M
              T

              23
              Online

              146.6k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors