fxDreema

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

    Distance from last open and only buy/sell above/below last open trade

    Questions & Answers
    3
    53
    4054
    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.
    • B
      bigfoot last edited by

      Hello, i wonder if someone can help.

      I'm stuck trying to find a block/s that will only allow the next trade to open after x pips above the last sell open trade or x pips below the last buy open trade?

      i've trade check distance and no trade nearby but doesn't seem to match my logic..

      many thanks

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

        Dark pink for each closed trade to get the open value - light pink pips away to get the distance - buy/sell

        Learn fxDreema Without the Wait!

        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

        Don’t miss out

        Click here➡️ https://mybook.to/fxDreema to get your copy today!

        Enjoy! 😊

        1 Reply Last reply Reply Quote 0
        • B
          bigfoot last edited by

          Thank You. This is where I'm at but its still opening trades without the minimum distance, feel like I'm missing something obvious?
          fxdreemasell.png

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

            Add a shared link rather than a picture. The sell needs to go under pink blocks

            Learn fxDreema Without the Wait!

            My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

            The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

            Don’t miss out

            Click here➡️ https://mybook.to/fxDreema to get your copy today!

            Enjoy! 😊

            1 Reply Last reply Reply Quote 0
            • B
              bigfoot last edited by

              Thank you, I'm still missing something and tried a new block whilst moving the sell under the pink blocks?

              https://fxdreema.com/builder

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

                That's the builder not your project page

                Learn fxDreema Without the Wait!

                My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                Don’t miss out

                Click here➡️ https://mybook.to/fxDreema to get your copy today!

                Enjoy! 😊

                1 Reply Last reply Reply Quote 0
                • B
                  bigfoot last edited by

                  Sorry, still finding my way around!

                  https://fxdreema.com/shared/ELhYJfKW

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

                    The pink blocks are looking for an existing trade which you don't have. For testing strip out the once per bar, test 1 condition at a time, as you get them working add others back in

                    Learn fxDreema Without the Wait!

                    My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                    The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                    Don’t miss out

                    Click here➡️ https://mybook.to/fxDreema to get your copy today!

                    Enjoy! 😊

                    1 Reply Last reply Reply Quote 0
                    • B
                      bigfoot last edited by

                      Think I've figured it out, direction mode = chart model and then once per bar under pink block and before sell block. Thanks for your help 🙂

                      jstap 1 Reply Last reply Reply Quote 0
                      • jstap
                        jstap @bigfoot last edited by

                        @bigfoot 👍

                        Learn fxDreema Without the Wait!

                        My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                        The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                        Don’t miss out

                        Click here➡️ https://mybook.to/fxDreema to get your copy today!

                        Enjoy! 😊

                        1 Reply Last reply Reply Quote 0
                        • B
                          bigfoot last edited by

                          Phew.. I thought this would be simple. At least I'm learning I think?

                          I've tried removing once per bar which should work as the logic of don't trade until n pips awy fromlast trade eliminates the need for it. However when I use Pips away from open price (-n pips for sell) it stops the trades from opening, if I use for each trade this also doesn't work out?

                          Is there a tutorial on using last open blocks, I can't seem to find one?

                          https://fxdreema.com/shared/jqQC2JOBd and
                          https://fxdreema.com/shared/oDjtOTsle

                          1 Reply Last reply Reply Quote 0
                          • B
                            bigfoot last edited by

                            I think my problem is using last open price?

                            Is this correct when what i want to achieve is for Sell - only open new orders x pips from the order most in current loss (i.e. averaging into the trade)?

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

                              A mix of both, you have to have an open price to have pips away. There is instruction pages, but what is in there you would have to look

                              Learn fxDreema Without the Wait!

                              My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                              The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                              Don’t miss out

                              Click here➡️ https://mybook.to/fxDreema to get your copy today!

                              Enjoy! 😊

                              1 Reply Last reply Reply Quote 0
                              • B
                                bigfoot last edited by

                                Thanks just working through the add to volume example on the how to pages to see if i can figure it out.

                                1 Reply Last reply Reply Quote 0
                                • B
                                  bigfoot last edited by

                                  OK 1 step forward 2 back...

                                  This should work but it's still not spacing the trades n pips away from last trade? At a loss now 🙂

                                  https://fxdreema.com/shared/tBvPx8Fhb

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    biztet last edited by

                                    @bigfoot, i understand you're trying to do martingale. Simply connect these 3 blocks and look for the settings.

                                    Screenshot_20240611_172113.jpg

                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      bigfoot last edited by

                                      Hi thanks, just want to add in extra trades above the previous open sell level. I've tried what you suggested but still adding trades beneath the set "gap"?

                                      https://fxdreema.com/shared/dKgUQUv9d

                                      1 Reply Last reply Reply Quote 0
                                      • B
                                        bigfoot last edited by

                                        So it will only send an order if the price is n pips above or greater than the last open sell order.

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

                                          Add to volume creates a new trade, so you need a sell block or an add block. One creates a parent trade and the other a child trade:
                                          image.png

                                          Learn fxDreema Without the Wait!

                                          My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                                          The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                                          Don’t miss out

                                          Click here➡️ https://mybook.to/fxDreema to get your copy today!

                                          Enjoy! 😊

                                          1 Reply Last reply Reply Quote 0
                                          • B
                                            bigfoot last edited by

                                            This is the code from my original mql file. I'll try and figure it out with with the blocks but I'm a bit confused now!

                                            bool CheckDistance(int type){
                                            GetLastOpenPrice();

                                            bool result = false;
                                            int dis =0;

                                            if(type==0){
                                            if(LastOpenPrice_Buy>0){
                                            dis = (int)(( LastOpenPrice_Buy - Ask)/myPoint) ;
                                            if(dis > Pip_Distance_Buy) return true;
                                            else return false;
                                            }
                                            else return true;
                                            }
                                            else if(type==1){
                                            if(LastOpenPrice_Sell>0){
                                            dis = (int)((Bid - LastOpenPrice_Sell)/myPoint) ;
                                            if(dis > Pip_Distance_Sell) return true;
                                            else return false;
                                            }
                                            else return true;
                                            }

                                            return false;
                                            }

                                            void GetLastOpenPrice( )
                                            {
                                            LastOpenPrice_Sell=0;
                                            LastOpenPrice_Buy =0;
                                            int total = OrdersTotal();
                                            if(total==0) return;

                                            int opentime_buy=0,opentime_sell=0;
                                            double openprice_buy=0.0,openprice_sell=0;
                                            for(int i = 0; i < total; i++)
                                            {
                                            if(OrderSelect(i, SELECT_BY_POS, MODE_TRADES) == false) continue;
                                            if(OrderMagicNumber() != MagicNumber || OrderSymbol() != Symbol() ) continue;
                                            if(OrderType() == 0){
                                            if(OrderOpenTime()>opentime_buy){
                                            opentime_buy = (int)OrderOpenTime();
                                            openprice_buy=OrderOpenPrice();
                                            }
                                            }
                                            else if(OrderType() == 1){
                                            if(OrderOpenTime()>opentime_sell){
                                            opentime_sell = (int)OrderOpenTime();
                                            openprice_sell=OrderOpenPrice();
                                            }
                                            }
                                            }
                                            LastOpenPrice_Buy = openprice_buy;
                                            LastOpenPrice_Sell = openprice_sell;

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

                                            Online Users

                                            A
                                            N
                                            S
                                            E
                                            A
                                            M
                                            T
                                            M
                                            A
                                            E
                                            K
                                            J

                                            22
                                            Online

                                            146.7k
                                            Users

                                            22.4k
                                            Topics

                                            122.6k
                                            Posts

                                            Powered by NodeBB Forums | Contributors