fxDreema

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

    Slide Order

    Questions & Answers
    2
    9
    1857
    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,

      I am trying to use Slide Order block but I am not sure I am doing it right. The picture below is what I want to do:

      1- Candle/Price is above indicator -> Sell Pending Order with SL - OK! (The opposite for Buy)
      2- Candle/Price rises, the Pending Order and SL should follow it - Doesn't work, but I can do it manually on MT5
      3- Candle/Price descend, reaches Sell Pending Order and the Sell is done -OK!

      [attachment=0:2x64nb9i]https://fxdreema.com/shared/SfmjlpR3d

      How to use Slide Orders properly?

      Thanks!

      ......
      slide order.png

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

        There is a block named "Trailing pending orders", I think this is what you want. Here is an example (for MT4) - https://fxdreema.com/examples/#Trailing....

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

          Thank you very much, that's exactly what I was looking for.

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

            Hi,

            I am using the block that you recommended, but it is not trailing the orders, I am not sure what is wrong.

            Please take a look at my current EA: https://fxdreema.com/shared/844mUl5Hd

            I want my Pending Orders to trail the price at a distance of 0,3% of Market Price.

            I calculate 0,3% using block "81" (Formula) then I use that value on block "91" (Trailing pending orders), but orders doesnt't move.

            On block "91" I tried using "Custom (price fraction)" and "Custom (level)" but had the same results.

            What could be wrong?

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

              In block 12 and 22 you have ask-bid on the left side, which is value like 0.0002

              Checking simple values like these in 11 and 21 is quicker than checking indicators in 10 and 10. 11 and 21 before 10 and 20 for quicker backtests.

              I don't know how long I will wait for a single order to be opened, but I forced their creation. Then they moved very often:

              https://fxdreema.com/shared/31ELYoSUb
              http://prntscr.com/apd7kq
              http://i.imgur.com/ujAsaro.png
              that trailing block is working for me, which means that I cannot replicate the problem and I need more info about your setup... and error messages 🙂

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

                Thanks for the fast reply and all the extra tips!

                I configured Blocks 11 and 21 (which checks Spread) this way because of this infomartion that I see on MT5:

                spread.jpg

                The Spread shows 3.00, which means 3 cents in Brazilian Real. I do my trades at morning when the Spread can get really high, so I want trades to happen only when Spread <= 5 cents. I was using the same metric as I see on MT5 screen, but I was wondering why it wasn't working. I'll try to change value to <= 0.05 to see if it works.

                Thanks for the tip on chancing block positions for faster backtesting! I'll change them so the indicator will only be checked if the values comparison pass the condition!

                Now talking about the problem with Trailing Pending Orders.... I did the same test as you (using your edited strategy to place buy/sell regardless of conditions) and it seems to be working... but I think there is something a little strange. I think it has to do with PIPs Steps (trailing distance steps).

                I don't know if you noticed but I avoid using PIPs in any condition or formula in my EA. Where I do trades, Brazil, everytime I tried to use PIPs I got very strange results.

                Here we don't use to work with PIPs. The smallest amount of money is 1 cent, which I believe it is 1 PIP? I am not sure, but I know that depending on the amout of lots I buy/sell, the value of each PIP changes. The minimum we can trade is lots of 100 (200, 300, etc). Depending on the stock price, I usually buy from 200 to 500 or 600 lots and the EA get diferent results...

                If I could use another kind of "Trailing distance Step", like amount of money (per x cents) it would work better. Do you think something like that is possible?

                If you have any interest, I can give you access to a demo account.

                Thanks!

                ......
                spread.jpg

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

                  I'm also not very used to these 2-digit numbers, but you can fix the pip size if you want. Click on the bench icon in the upper right corner and you will see the project's options where at the top you can put some rules. These are by default:

                  __0.001 = 0.01
                  0.00001 = 0.0001
                  0.000001 = 0.0001[/quote:28pbmyj2]

                  The first line means that if the point size of the symbol is 0.001, that EA will work as the point size is 0.01. In other words, the same size of a PIP will work the same on symbols with 3 and 2 digits. 1 PIP = 0.01. For your symbol there is no specific rule, 1 PIP should be 0.01.

                  But if my variant it works for you... I don't know, all trailing blocks are independent, they just do their job. Do you have errors? Because there are some limits sometimes - https://book.mql4.com/appendix/limits

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

                    EDIT: Hey, I am editing this post because the results I posted below is not very consistent.... it varies a lot. Overall, it is working.
                    Maybe on a real account the results will be better (I am currently testing on Demo account). Thanks for all your help!!

                    Hey,

                    I think I figured out what is going on. As I said previously, in Brazil, buy/sell orders can only be made on the hundreds: 100 lots, 200 lots, 300 lots, etc.

                    I have the block "Trailing pending orders" using the minimum step of 1 PIP.

                    When my EA place a buy/sell order of 200 lots (the minimum I use), each modify order happens at a pace of 2 cents.

                    When my EA place a buy/sell order of 300 lots, each modify order happens at a pace of 3 cents.

                    Etc... 400 lots -> 4 cents step, 500 lots -> 5 cents steps.

                    While it is not optimal, it is working. It is not optimal because the higher the lots, the more volatile the price is.

                    I calculate my trades on a base of $10.000. If the price of a stock is $50 my order will contain 200 lots, if the price is $20 my order will contain 500 lots.

                    If I am in a trade with 500 lots and each "modify order" happens at a pace of 5 cents, it means $25 money for me (5 cents x 500). And $25 is a huge step. On lower lots, like 200, each "modify order" happens at a pace of 2 cents and it means $4 money (2 cents x 200) which is more acceptable.

                    Do you understand what I am saying? If yes, do you think there is a way to make those "modify orders" shorter? Maybe based on real money (cents) instead of PIPs...

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

                      But "Trailing pending orders" is working with pips, which is some kind of price. This block does not care what is the lot size... or at least it should not care.

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

                      Online Users

                      K
                      F
                      Z
                      S
                      C
                      P

                      17
                      Online

                      146.7k
                      Users

                      22.4k
                      Topics

                      122.6k
                      Posts

                      Powered by NodeBB Forums | Contributors