fxDreema

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

    Select the top 5 variables

    Questions & Answers
    2
    4
    1715
    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.
    • B
      BlueMoon last edited by

      I have like 100 variables with different numeric values. How do I get the a list of variables whose values are the top 10 out of those 100 and put such a list as comma separated into another variable?

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

        0_1526073592083_34b87fe8-9460-43ea-98c4-5c5969708d8c-image.png

        0_1526073658727_efedf929-879d-4d7f-b013-96411d4767ec-image.png

        https://fxdreema.com/shared/qCD0MIr8

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

        1 Reply Last reply Reply Quote 0
        • B
          BlueMoon last edited by

          Thank you so much. I got to learn something really nice.

          However, seems like I didn't explain it clearly what I needed. This code will generate a string with values of all the variables(out of 100) that has top 10 values separated by a comma. But I need the vairable names separated by comma. The result variable should look more like the following:

          "var01,var09,var99,var10,var77,var72,var91........"

          Thanks for your help

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

            in that case use 2D array, mql support sorting by first dimension ... and other dimension will be reference for another string array which will be holding names of variables
            here:

            https://fxdreema.com/shared/HSKz4cwHc

            0_1526113788869_67f213c5-575e-44bb-bc47-b2175a668362-image.png
            0_1526113917119_8aeefe8a-c4ff-4dcf-8890-51a627ff04eb-image.png

            0_1526113715076_2de76445-e818-41fe-9fcd-4cfc0d89b992-image.png

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

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

            Online Users

            C
            N

            18
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors