fxDreema

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

    Object on chart on chart that EA is not running on

    Questions & Answers
    3
    10
    3806
    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.
    • N
      nickmccomb last edited by

      I am using custom code block to open a new chart that has a default set of indicators on it. When looking for objects on the newly opened chart my EA cannot see the objects. Do the objects have to be on the same chart the EA is running on?

      Even if I put in the chart symbol in the block it doesn't find the objects on the new chart.

      Is there a way for the EA to look at objects on an open chart for a pair if the EA is not running on that chart?

      timmyhanke 1 Reply Last reply Reply Quote 0
      • timmyhanke
        timmyhanke @nickmccomb last edited by

        @nickmccomb

        it should work by using select object by name , if that block finds a object with that exact name it will pass , or you can use the yellow dot , meaning if the object is not found then that will pass

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

          I think you can access objects from another chart, but I didn't set this option on the "For each Object" block, so only the current chart is used

          N 1 Reply Last reply Reply Quote 0
          • N
            nickmccomb @timmyhanke last edited by

            @timmyhanke it doesn't work, i am referring to the object by name: http://imgur.com/a/q64AM

            timmyhanke 1 Reply Last reply Reply Quote 0
            • timmyhanke
              timmyhanke @nickmccomb last edited by

              @nickmccomb

              I usually do it this way , this is by moving the line but it should work with everything , i use select object by name , and if that object exists it will move it to my referred point in price.

              In this case , if price is > high line it will move it along price as long it has contact with it and the other line '' low'' will follow that by -10 pips below.

              0_1503839009102_high.jpg

              N 1 Reply Last reply Reply Quote 0
              • N
                nickmccomb @fxDreema last edited by

                @fxDreema i don't get this. It sounds like you say i can access objects from another chart, but you didn't set an option on a block, so i can't use objects from another chart? Doesn't make sense to me sorry. I can or i can't?

                fxDreema 1 Reply Last reply Reply Quote 0
                • N
                  nickmccomb @timmyhanke last edited by

                  @timmyhanke said in Object on chart on chart that EA is not running on:

                  is > high line it will move it along price as lo

                  Doesn't work for objects on another chart, even if i put in the pair symbol in 'Market' parameter

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

                    @nickmccomb I mean that in MQL4 we have some option for ObjectFind() - https://www.mql5.com/en/docs/objects/objectfind - you can see that chart_id parameter. But I'm not sure what they mean - chart or subwindow. I will test that later and if it works, I will add some option.

                    1 Reply Last reply Reply Quote 0
                    • N
                      nickmccomb last edited by

                      That will be great, thank you!

                      1 Reply Last reply Reply Quote 0
                      • N
                        nickmccomb last edited by nickmccomb

                        I use ChartOpen to open the chart, that returns the ChartId which i can then use as chart_id in ObjectGetValueByTime. e.g:

                        v::H_one_R = ObjectGetValueByTime(v::ChartId, "H1_R", TimeCurrent(), 0);

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

                        Online Users

                        S
                        O
                        K
                        M
                        M

                        23
                        Online

                        146.7k
                        Users

                        22.4k
                        Topics

                        122.6k
                        Posts

                        Powered by NodeBB Forums | Contributors