fxDreema

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

    condition

    Questions & Answers
    2
    8
    1839
    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.
    • J
      juri283 last edited by

      Hi,
      I would like to create something like that:

      Once per tick > condition1 > condition2 > CONDITION3 > buy now (or sell now, doesn't matter)

      The chain should pass through CONDITION3 only if there is no same trade yet - for the same amount of lots at the same price. For example if EA placed buy order as instant execution (EURUSD, 0.1 lots, 1.12345, 15:00) and now condition1 and condition2 are fulfilled as well only with one difference – it is one hour later (EURUSD, 0.1 lots, 1.12345, 16:00), condition3 will not be fulfilled because the same trade already exist from 15:00 and it didn't achieve S/L or T/P yet. I just don't want to have 2 or more same trades executed in the same price in different times, trades with different lot size can be executed in the same price, they just must be different from each other in something, not only in time of execution.
      How to do it?

      sorry for my english, I hope you understood.
      Thanks for help.

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

        "Once per tick" is not needed.
        Search for "No trade is running" block, I think you need this one.

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

          No, I'm not looking for "no trade is running" block.
          I don't care how many trades are running, I just don't want 2 or more same trades be running IF they have been executed in the same price. I explained example above 🙂

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

            There is a parameter named "Group" in all trading blocks, it can be used if needed.

            I don't know why and how you can have two trades at the exact same price, and to check something like that does not sound very good idea for me. You know that when you put a new trade, it can be actually placed at different price than requested. Also, buys are opened at Ask, sells at Bid, so there are always differences between open prices.

            Maybe you want to use area of prices, like Open price +/- 5 pips? This sounds like good idea for a new block, something like "Check for trades nearby".

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

              Believe or not but I really have two exact same trades at the exact same price and I don't want to - this is a reason why I need a condition to prevent it. Alternatives you suggested are not helpful for this purpose. So let me ask once again: How can I check if the price I want to open a new trade at is already "occupied" or not by the same trade placed before. Another trade (sell or buy with another lot size) can be open at the same price, but not the same one.

              many thanks!

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

                Well, ok. Then this might help: http://fxdreema.com/shared/QtLpYCkrc
                I didn't tested it seriously, but at least I think I'm close.

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

                  wow, it looks great. Thank you for your time. I will try to understand it tomorrow.

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

                    You should know that the pink block is self-repeating as many times as many trades there are. When it finish it's job, it exits from the yellow output. Whie running, that block also loads attributes of the current trade that it is working with, and that attributes can be read in the way you will see in block 3.

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

                    Online Users

                    M
                    D
                    A
                    S
                    D
                    R
                    S
                    A
                    E
                    S
                    S
                    A
                    A

                    18
                    Online

                    146.8k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors