fxDreema

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

    Defining constant for MA Method

    Questions & Answers
    5
    7
    1657
    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.
    • F
      Flip last edited by

      The MA method has got 4 options, can these be used with a Constant so that the user can select the preferred setting? What is the way to do this?

      Thank you.

      0_1484307123587_upload-54cf4aad-14b6-47fd-9c34-6e4a75c6808f

      1 Reply Last reply Reply Quote 0
      • M
        miro1360 last edited by miro1360

        yes they can be, just your constant is:
        int maMethod 0
        values can be from 0 as SMA, 1 as EMA, 2 ssma, 3 lwma (I think this is order for methods) ...
        the same you can do for Timeframes, but note that they values are 1 for M1, 5 for M5, 60 for H1, 1440 for D1, 10080 for W1 ...

        Between trading and gambling is a very small gap, be careful.

        piotras10000 1 Reply Last reply Reply Quote 0
        • F
          Flip last edited by

          Thank you!

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

            You can try to give that constant data type of ENUM_MA_METHOD instead of int

            1 Reply Last reply Reply Quote 1
            • F
              Flip last edited by

              That's even better, thank you!

              1 Reply Last reply Reply Quote 0
              • piotras10000
                piotras10000 @miro1360 last edited by

                @miro1360 ENUM_MA_METHOD is correctly.

                G 1 Reply Last reply Reply Quote 0
                • G
                  GTOAT777 @piotras10000 last edited by

                  @piotras10000 This post was 5 years old

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

                  Online Users

                  E
                  C
                  M
                  O
                  H
                  F
                  H
                  M

                  12
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors