fxDreema

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

    How to open a chart?

    Questions & Answers
    3
    7
    2254
    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.
    • vish
      vish last edited by

      How can I create a custom code to open a particular chart? MQL provides the following function but I am not sure how to use it on fxdreema

      ChartOpen
      Opens a new chart with the specified symbol and period. The command is added to chart message queue and executed only after all previous commands have been processed.

      long ChartOpen(
      string symbol, // Symbol name
      ENUM_TIMEFRAMES period // Period
      );

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

        0_1536524373077_6228b307-fcbc-4ef8-afae-78a3b3b0a1c1-image.png

        https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes

        J 1 Reply Last reply Reply Quote 0
        • vish
          vish last edited by

          It works. Thank you

          1 Reply Last reply Reply Quote 0
          • J
            Jaico @fxDreema last edited by

            @fxdreema si solo pongo Chartopen(PERIOD_M15, PERIOD_M30, PERIOD_H1); una vez coloque el ea, abrira esos tf del par donde coloque el ea?

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

              @Jaico, this will not work. This is the definition of ChartOpen() - https://www.mql5.com/en/docs/chart_operations/chartopen As you can see, it accepts only 2 parameters. You can run it multiple times if you want:

              ChartOpen("EURUSD", PERIOD_M15);
              ChartOpen("EURUSD", PERIOD_M30);
              ChartOpen("EURUSD", PERIOD_H1);
              

              To to that on the current symbol, use Symbol() instead of "EURUSD"

              ChartOpen(Symbol(), PERIOD_M15);
              ChartOpen(Symbol(), PERIOD_M30);
              ChartOpen(Symbol(), PERIOD_H1);
              
              J 1 Reply Last reply Reply Quote 0
              • J
                Jaico @fxDreema last edited by

                @fxdreema gracias funciona perfecto , y si en esos graficos quiero que salgo mi ea con la misma configuaracion,
                como debo ponerlo?

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

                  This function only opens another charts, I don't know how to add EAs to them

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

                  Online Users

                  D
                  V
                  O
                  J
                  B

                  15
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors