fxDreema

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

    Trendline Question: How to detect when the price breaks TL

    Questions & Answers
    3
    6
    1686
    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
      fiftybillion last edited by

      Hello FxDreema!

      Thank you always for taking time to answer questions!

      I am just experimenting with trendlines.
      I want the EA to comment when the price breaks above the trendline; Above Trendline.
      When the price is below the TL, it should comment; below Trendline.

      I am having problems configuring how the EA detects when the price moves above the trendline and wondered if you could help me.
      Here is a shared weblink.
      http://fxdreema.com/shared/e92SlWhzb

      Best Regards,

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

        In this EA you detect whether the price is above or below the trendline, and it works... no matter if one of both comment messages is not edited.
        To detect when it breaks is another story. This means that the price is going from below to above or from above to below. So I can suggest to use crossover: http://fxdreema.com/shared/2HwDQrbAb
        By the way I found a little problem using in objects category in Condition when using it this way and I fixed it, so use this example on the web version because it will probably don't work on the local one at the moment.

        1 Reply Last reply Reply Quote 0
        • F
          fiftybillion last edited by

          __In this EA you detect whether the price is above or below the trendline, and it works... no matter if one of both comment messages is not edited.
          To detect when it breaks is another story. This means that the price is going from below to above or from above to below. So I can suggest to use crossover: http://fxdreema.com/shared/2HwDQrbAb
          By the way I found a little problem using in objects category in Condition when using it this way and I fixed it, so use this example on the web version because it will probably don't work on the local one at the moment.[/quote:lnb6ru4z]

          Hi thanks! The web version was very helpful!

          I have another question regarding TL.
          There are 2 points in TL. Point 1 and Point 2.
          Is it possible to change point 2 of the trendline when the high/low of the candle goes through the trendline but the closed price of the candle remains within the trendline?
          If so, which block can I use to redraw or to re-define point 2?

          Regards,

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

            Well, it is possible in MQL4/MQL5 using ObjectSet function, but I was not added this in fxDreema. I don't know when will I work on objects again (now I work on documentation), but you can try http://docs.mql4.com/objects/objectset
            Something like...

            
            ObjectSet("MyTrendlineName", OBJPROP_PRICE2, 1.2345);
            

            or with first checking if the objects exists:

            string name="MyTrendlineName";
            if (ObjectFind(name)<0) {return(0);}
            ObjectSet(name, OBJPROP_PRICE2, 1.2345);
            
            1 Reply Last reply Reply Quote 0
            • F
              fiftybillion last edited by

              Thanks for your help!

              I haven't tested it out yet but I will do so in the near future!

              Thanks again! 😄

              1 Reply Last reply Reply Quote 0
              • W
                wodstock last edited by

                Really helpfull thanks

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

                Online Users

                T
                M
                U
                S
                F
                M

                14
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors