fxDreema

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

    Strategy for: Do Not Trade Inside Chart Rectangle

    Questions & Answers
    2
    4
    1106
    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.
    • R
      rafaelgrecco last edited by

      Hi guys,

      I have a EA that draws Resistance / Suport lines on my charts and Draw rectangles around it based on ATR. I call these rectangles "no trade zones", which means that I don't want any trades to be opened near these lines.

      But I can't find a way to tell my EA to not trade inside the rectangles... does anyone know how to do it?

      https://ibb.co/cCHUD6

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

        @rafaelgrecco

        use 2 conditions , price is below the upper line and price is above the lower line , connect that to an and block and there you have it 🙂

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

          @timmyhanke thanks for the reply.

          The problem is that there can be several lines and rectangles. The rectangles are dynamically created and deleted, so I name them with a prefix so they can be select.

          I have to dynamically select the object by the name prefix (object in loop) to compare current price to the low and high of each rectangle. This must be done to all rectangles on the chart.

          ... I was trying to use a boolean variable (true/false) to Enable and Disable trades, but it was getting too complicated.

          Thinking about the AND block, I could use it directly on my buy/sell strategies. If we had a NAND block it would be perfect. Do you know if we can "make" a NAND or a NOT block? That would solve the question.

          EDIT: Alright, I figured it out. Thanks for the help timmy!

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

            @rafaelgrecco

            sure that you figured it out ? beacuse what i know you will have a line above everything and a line below evertything , based on your knowlage and your risktaking, so to make a condition that are between those meaning < high and > low and connect that to an and block and use that as a filter and add that to your buy/sell conditions , and drag the and yellow dot to continue your jouney , meaning if its not between those two lines , in your case that the market isnt raging .

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

            Online Users

            E
            J
            T
            J
            B

            16
            Online

            146.7k
            Users

            22.4k
            Topics

            122.6k
            Posts

            Powered by NodeBB Forums | Contributors