fxDreema

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

    How to check existing trade?

    Questions & Answers
    2
    7
    1977
    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.
    • P
      Pityu last edited by

      Hi fxDreema,

      Great site and hard work, well done!

      I need some help. I tried a lot of things but I couldnt find the block to do this:
      How can I check an open position and open an other position when for example the market price goes 10 pips under the opening price of the first position?
      Thank you in advance.
      Pityu

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

        One way is to create multiple pending orders at some distance from each other. They are also executed on the server, which is a good bonus, and they also support expiration. "Buy pending orders in grid" or "Sell pending orders in grid" is to do that.

        Otherwise you have to spy the last trade. Something like this: https://fxdreema.com/shared/HdVlWXpKc

        1 Reply Last reply Reply Quote 0
        • P
          Pityu last edited by

          Thanks,

          I am wondering is there any way to give ID numbers to the positions so then the "FOR EACH TRADE" block could filter only that position? or I have to use group numbers..but it does not work for me.

          Also for some reason the first block "NO TRADE/ORDER EXIST" does not work for me...during test the robot opens lots of positions at the same time. Is it because I gave group numbers?

          https://fxdreema.com/shared/kIUtFgy0b

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

            Yes, because of group numbers. No trade exists now checks trades with group = 0, then you create a trade with different group number, and No trade exists just don't care about that.

            Well, if you can separate trades by type (Buy, Sell), do it by type. Note that all pink blocks are universal, they work for buys and sells (whateve For each Trade is loading above).
            Look at "Not more than N trades" option in "For each Trade". it depends, but I think you should set it to 1... maybe. And also take a look at the "once per trade/order" block, I think you have to put this one after the "pips away".

            1 Reply Last reply Reply Quote 0
            • P
              Pityu last edited by

              Hi,
              I am back again. I am stuck again.
              somehow I can not make the ea to close the trades.
              I want to close all the trades when any of the trades hit the take profit.
              the robot would open 0,1 lot buy position then when the price goes 15 pips below opening price opens a sell position with double size lot (0,2 lot). when the price goes up again abowe the opening price of the sell position - open an other buy with double size(0,4 lot) so on...
              But I want the robot close all the positions when any of the positions hit the TP. what is wrong in my project?

              https://fxdreema.com/shared/Vh6W7Kjxe

              is there any more simple way to do this?
              thank you in advance.

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

                Try "on Trade" event. There is a block to filter the event when some trade closes (by TP, if needed) and then put "Close trades".

                For the other thing, why don't you try this block "Round numbers detector", I think it does exactly what you want to do. Write 0.0015 inside and connect one Buy now and one Sell now to it's outputs.

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

                  https://fxdreema.com/shared/pPFbJGAxd

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

                  Online Users

                  J
                  S
                  W
                  A
                  H
                  H

                  19
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors