fxDreema

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

    Close trade when take profit is higher then sell price

    Questions & Answers
    3
    22
    3767
    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.
    • W
      Wakalz99 last edited by Wakalz99

      I tried to create a simple ea which should keep checking take profit, when ever take profit is set higher then selling price or below then buying price, it should close that specific trade immediately on current market price.

      I used if trade balloon on tick then conected codition to it and then used close trade ballon. But this is not working, there are trades on the pair i started it on which has take profit greater then selling price, but it is not closing them, keep saying working. Please some one help me out??

      T 1 Reply Last reply Reply Quote 0
      • T
        trader.philipps @Wakalz99 last edited by

        @wakalz99 Don't understand what you try to do. Do you have a project started that you may share?

        I like to share my knowledge, but expect the others to contribute as well.

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

          I already have a EA which create order as market moves. It open orders like this
          Sell
          .01
          .02
          .03
          .05 etc
          And recalculate and reassign take profit upon opening any order.
          So i was trying to create an ea that can close an order when its TP is set higher then sell or lower then buy by the EA i am already using.
          This is to stop carrying losses as market keep moving opposite to my direction.

          T 1 Reply Last reply Reply Quote 1
          • T
            trader.philipps @Wakalz99 last edited by

            @wakalz99 If you are using an existing EA and try to modify the TPs / SLs of the trades it created, you should first check if when you manually change a SL or TP, the EA re-sets it again. In that case it wouldn't be possible by adjusting the SL/TP.
            The only way would be to close when a certain point in time or loss or profit is reached.

            I like to share my knowledge, but expect the others to contribute as well.

            1 Reply Last reply Reply Quote 0
            • l'andorrà
              l'andorrà last edited by

              Are you working on a project doing that? Could you please share it for us to take a look?

              (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

              (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

              (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

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

                As i described earlier my EA lets call it Boss, Boss opens trade and set take profit value for it.when price move against Boss's position, boss place more orders and re adjust Take profit value for all by modifying all open trades for that pairs. I want to create an EA here which keep checking open prices for Selling/Buying of trades and check if Take Profit is Greater/Lower then Selling/Buying, if it Found that it close trade immediately at current market price.

                Check If Selling Open Price is <= Take profit, Close this Trade Immediately
                or
                Check Take Profit Value if >= Sell open price Close this Trade Immediately

                Check if Buying open price is >= Take Profit, Close this Trade Immediately

                                                                or
                

                Check Take Profit Value if <= Buy Open Price, Close this Trade Immediately

                Selling Price is 1.05, TP is set 1.06 Close this Trade Immediately
                Buying Price is 1.10 TP is set 1.09 Close this Trade Immediately

                I believe now you understand it clearly.

                T 1 Reply Last reply Reply Quote 0
                • T
                  trader.philipps @Wakalz99 last edited by

                  @wakalz99 Okay, I understood that you have some marti-grid EA - some call it averaging EA and it keeps openeing positions against the market. It has a steaddy profit it needs to reach - some kind of a "virtual take profit" when the complete basket of trades will be in profit.
                  What you want to do now is to close positions, whose open price is lower than this "virtual take profit" as they will be in loss anyway, right?

                  I like to share my knowledge, but expect the others to contribute as well.

                  W 1 Reply Last reply Reply Quote 0
                  • W
                    Wakalz99 @trader.philipps last edited by

                    @trader-philipps yes exactly, and i cant do it by connecting ballons, you have any idea which ballons i need and in which order.

                    T 1 Reply Last reply Reply Quote 0
                    • T
                      trader.philipps @Wakalz99 last edited by trader.philipps

                      @wakalz99 Just a rough try how I would start. This one is for buy orders on the symbol the EA is attached to. You maybe need to set same magic number as you boss EA has.

                      0_1570490542809_e97af74b-d8a1-4db2-b99f-9edc96dbbe54-image.png

                      I like to share my knowledge, but expect the others to contribute as well.

                      T 1 Reply Last reply Reply Quote 0
                      • T
                        trader.philipps @trader.philipps last edited by

                        @trader-philipps I forgot to mention that it's on the on trade tab!

                        I like to share my knowledge, but expect the others to contribute as well.

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

                          Thank You @trader-philipps it worked like magic. i want doing a bit different and second mistake was doing in on tick and on init. 😞

                          Thank You again

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

                            Can please help me to do this same thing if no of orders are greater then certain number ?
                            Count total number of sell orders if > 10 Check if Buying open price >= Take Profit, Close this Trade Immediately.

                            T 1 Reply Last reply Reply Quote 0
                            • T
                              trader.philipps @Wakalz99 last edited by

                              @wakalz99 So you'd just add a condition like that ..

                              0_1570560050566_3e78373c-9b3c-4add-b4e2-13575c565e78-image.png

                              Is that what you're looking for?

                              I like to share my knowledge, but expect the others to contribute as well.

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

                                fxdreema does not support entry price? as for open price it is considering maybe candle start price or something else, but for sure not Buying/Selling price. any idea?

                                T 1 Reply Last reply Reply Quote 0
                                • T
                                  trader.philipps @Wakalz99 last edited by

                                  @wakalz99 Open Price is the price that will appear in your terminal and is the open price of the order!

                                  I like to share my knowledge, but expect the others to contribute as well.

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

                                    it keep closing all orders, order xauusd 1501.90 tp was 1499, it closed it when market price was 1501.96.
                                    same for buy orders

                                    T 1 Reply Last reply Reply Quote 0
                                    • T
                                      trader.philipps @Wakalz99 last edited by

                                      @wakalz99 Can you share your project? It's hard to tell as my crystal ball is in repair 😉

                                      I like to share my knowledge, but expect the others to contribute as well.

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

                                        trust me the thing is wrote above is the EA i am trying to create just that simple. for your further research, search vzlomishk in google and download that ea. that is the one i am using and want to use this ea along with vzlomishk to control my losses.

                                        T 1 Reply Last reply Reply Quote 0
                                        • T
                                          trader.philipps @Wakalz99 last edited by

                                          @wakalz99 said in Close trade when take profit is higher then sell price:

                                          vzlomishk

                                          Sorry, but I'm not interested in marti grid EAs. Just wanted to help you out. If EA doesn't do what you intend to do, we need to have a look at. Otherwise we can't help.

                                          I like to share my knowledge, but expect the others to contribute as well.

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

                                            0_1570564974744_Untitled.png
                                            this is the total thing i am trying to create and its not working as it should. also i tried all 3 take profit modes, price level fraction and pips.

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

                                            Online Users

                                            E

                                            11
                                            Online

                                            146.9k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors