fxDreema

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

    Problem with sell orders

    Questions & Answers
    2
    15
    2934
    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
      rocker699 last edited by

      fxdreema generator screenshot.jpgHi there,

      I was wondering if anyone could help me. I have a very simple logic. Open order when the color changes from blue to orange and vice versa.
      Everything is working except when it places sell order it keeps on placing orders everyt ick. For buy it's not the case. Works completely fine for buy orders. I am testing the EA on strategy tester mt4 build 610. I thought maybe coz of the changes in mt4 the strategy tester was screwed up. But i tried on a demo account and the same result. I am using a custom indicator(nonlag ma). I am attaching a screen shot of the problem as it will give a better understanding of the problem. Any help would be greatly appreciated. Thank You.

      ......
      strategy tester screenshot.jpg
      fxdreema generator screenshot.jpg

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

        I guess the problem is that "Close trades" is executed too often, not only when needed. I have seen your project and in those Conditions you compare two indicators (the same indicator with different settings) with == sign, I think this is not correct. You can try some block from "Indicators" category, or check what your indicator returns using "Indicator tester" block (this is to know what values you are actually comparing).

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

          __I guess the problem is that "Close trades" is executed too often, not only when needed. I have seen your project and in those Conditions you compare two indicators (the same indicator with different settings) with == sign, I think this is not correct. You can try some block from "Indicators" category, or check what your indicator returns using "Indicator tester" block (this is to know what values you are actually comparing).[/quote:1003jl8l]

          No the condition part is completely fine. I tested the buffers and everything at another instance with this logic:

          No trades running --> condition --> sell now - Buy Now

          The trades are executed perfectly. It is only when i changed to put "close trades" in this logic is where it screws up(mind you only for sell orders...not for buy). Seems to be that there is a problem with the code generator!! You should look into it!!lol Otherwise great program. I will try what you suggested. Thanks.

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

            ____I guess the problem is that "Close trades" is executed too often, not only when needed. I have seen your project and in those Conditions you compare two indicators (the same indicator with different settings) with == sign, I think this is not correct. You can try some block from "Indicators" category, or check what your indicator returns using "Indicator tester" block (this is to know what values you are actually comparing).[/quote:211ediso]

            No the condition part is completely fine. I tested the buffers and everything at another instance with this logic:

            No trades running --> condition --> sell now - Buy Now

            The trades are executed perfectly. It is only when i changed to put "close trades" in this logic is where it screws up(mind you only for sell orders...not for buy). Seems to be that there is a problem with the code generator!! You should look into it!!lol Otherwise great program. I will try what you suggested. Thanks.[/quote:211ediso]

            Actually you were right. Got it working now. Thanks a lot for the advise. You are the best 🙂 p.s Hands down the best site for EA creation!! No bugs in fxdreema 😛

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

              Hello again sir,

              I was just wondering if there is a way to delay a trade by a certain amount of time. lets say when an indicator gives a buy or a sell signal..wait a fixed amount of time which the user inputs and then buy or sell?

              or if that is not possible. How would i go about putting an order after a signal confirmation and not on current signal? is there a option here or would i have to look at the source code and make changes for that? Thank you so much. Any help would be greatly appreciated. 🙂

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

                There is a block "Delay", it actually stops the EA for a while at that moment. if this is the idea...

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

                  __There is a block "Delay", it actually stops the EA for a while at that moment. if this is the idea...[/quote:1lhkzrrz]

                  Yes i tried that option. But while backtesting it wasn't working. Or maybe i did something wrong. Anyways i will try again. Thanks. p.s the 10 block connection sucks 😛 I vote for unlimited blocks for free or maybe 20 blocks for free:P hehe...

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

                    There is a special option for backtesting, normally it doesn't work for backtesting because the time is not real when you backtest. But there is an option anyway, it needs to allow dll because it's something like a trick. If you want the delay to see things more clear in backtesting, look for that words "When backtesting..." in that block.
                    If you want something else... probably describe how it should work?

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

                      i tried that.. I chose the option for visual mode.. but it stops the strategy tester and the continues from the same point..not a specified time later!! i I want the trade(buy or sell) to delay...not the strategy tester!!

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

                        but like i said..i might have done something wrong.. not that i know that i am looking at the right thing.. i will try to make it work.

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

                          How do you imagine that logically?

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

                            that is the question that i should be asking my self 😛 lol

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

                              I had an idea of a block that when executed once, will remember to execute the next blocks after some time. But I suspect there is something missing here and I'm not sure this is practical. For example if you delay "Buy now" with 5 seconds, and then when the event will happen - in the beginning of some tick just before other blocks blocks to be executed, or after some of them, or after all of them, or on the exact place where the block is.

                              Why do you want this actually, maybe you are trying to fix something that can be fixed in another more appropriate way?

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

                                It is practical:

                                It would be just like a pending order.. but in this case you are specifying in time of when to open the trade..and not in pips. (after the desired signal ofcourse)

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

                                  So, pending orders in time instead of price. I started thinking how can I do that, probably in blocks "Buy pending order" and "Sell pending order" with another options that makes it possible to delay the order with time and to execute it as a trade at the price whatever it will be in the future. But I'm still not sure about the consequences of this approach, because another blocks (like "No pending order exists") must be updated as well, and some driver needs to be added to detect the time to react, which will also slow down the backtesting a tiny bit.

                                  If it is a block like "Delay passing" which will allow the EA to continue working, then some more problems will be on the table, because there is no context here, it's something general. For example you can have "No trade is running -> Delay passing -> Buy now", but how will "No trade is running" know that we expect "Buy now" to be executed after some time? It will just continue passing and executing "Delay passing" over and over again, which will create multiple delays for the same thing and at the end we will end up with multiple "Buy now" executions. Again, this is in the general case when "Delay passing" is not aware what it controls.

                                  Because of that, and because it looks a little bit fancy (and who knows if others will need it), I will ask you for the exact situation that you want to work on. It happens very often someone to ask for A, but to want to achieve B that does not actually need A. And sometimes there are various ways to do something. So, with what time do you want to delay the signal? You know... if we talk for indicators only, and the signal you want to delay is something like 1 candle or few candles, then you can just check past candles for that signal and react at the moment, this is how things are done normally 🙂

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

                                  Online Users

                                  H
                                  H
                                  T
                                  S
                                  A
                                  S
                                  I
                                  H

                                  17
                                  Online

                                  146.7k
                                  Users

                                  22.4k
                                  Topics

                                  122.6k
                                  Posts

                                  Powered by NodeBB Forums | Contributors