fxDreema

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

    Work Around Error 130 with MarketInfo

    Questions & Answers
    2
    7
    1876
    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.
    • S
      steveukrm last edited by

      Hi there,

      Firstly, thank you so much for this software! I've nearly copied a custom EA I paid £600 for as a test of your software and I'm really happy with what I can do with fxdreema.

      I'm trying to find a way to deal with the 'Error 130'. I found a workaround online (http://www.earnforex.com/blog/ordersend ... hat-to-do/) and it looks like it's worth a try. How would I find the MarketInfo data? I've looked at all the drop down menus available but can't see where this information is.

      I look forward to your reply.

      Thank you,
      Steve.

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

        What block causes this error? This error means that SL or TP are at impossible levels or are too close to the open price (brokers sometimes has limits).
        You can also try to work with virtual stops, they are basically horizontal lines, which are constantly checked and when the market price touches them - the trade is closed. Go to "Options -> Current project options" for these settings.

        1 Reply Last reply Reply Quote 0
        • S
          steveukrm last edited by

          My EA is a volatility EA which uses ATR in several ways. I enter on a 5min chart based on a custom indicator I had coded. I use a fraction of the ATR value of the daily chart to place stops. I've been testing different methods (tight stops with higher lot sizes vs larger stops with smaller lot sizes) to look at a strategy that gets both gains from smaller moves and also stays with a longer trend.

          Anyway, what I would like to do is the following:

          1. When indicator gives signal, have the EA compare MarketInfo minimum stop with the stop proposed by the EA.
          2. If EA stop is less than minimum allowed by broker then either change stop (and recalculate lot size to keep risk the same) and then place order at min stop level, OR if I get the Error 130 then close trade immediately.

          At the moment a trade is placed every now and then where a stop can't be placed (Error 130) and my trailing stop function then sees no SL and places one but the trailing SL is larger than the initial SL and I end up with the occasional large loss. After seeing this error crop up every now and again there's no way I can let an EA go live without being able to handle errors as I would like.

          The other thing that comes to mind is "How are errors handled?" I'd like to have routines in place to work around errors like 130 but perhaps if other error types come up then the trade would be closed immediately.

          I'm happy with the logic of my blocks but I just need the MarketInfo data. If you don't provide access to this can I create a custom block myself using MQL code?

          Thank you for your prompt response by the way.

          Kind regards,
          Steve.

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

            There is small strange problem unfortunately. I wanted to make things so that the EA first to check the minimum possible SL/TP size, and if the requested one is lowest, to put the minimum. But in my MetaTrader there is not information abount the minimum - "Stops level" property is 0, but I can't put SL/TP lower than 1 pip. So I think we can't rely on this MarketInfo property.

            Now my next idea is when SL/TP modification fails, the EA to start trying with bigger SL/TP than requested, incrementing the size with 1 pip every time. But this will probably produce big log.

            Yes, custom blocks can be made. It should be something like this...

            if (MarketInfo(blablabla)) {~next~} else {~inext~}

            But first try to see if Stops level works at all.

            1 Reply Last reply Reply Quote 0
            • S
              steveukrm last edited by

              Hi,

              I'm trying to use the library to create my custom block for the MarketInfo data but when I open the library I get the following displayed.

              Warning: include_once(C:\Program Files\fxDreema\Data\globals\functions\filesystem.php): failed to open stream: Permission denied in C:\Program Files\fxDreema\Data\configuration.php on line 14

              Warning: include_once(): Failed opening 'C:\Program Files\fxDreema\Data/globals/functions//FileSystem.php' for inclusion (include_path='.;C:\Users\Steve\AppData\Local\FxDreema{18D1BCB9-84FB-4AA4-9FDE-B7796D37D947};C:\Program Files\fxDreema\Data') in C:\Program Files\fxDreema\Data\configuration.php on line 14

              Any idea how I can fix this?

              Kind regards,
              Steve

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

                What Windows do you use?
                Windows UAC enabled? I can suggest to disable it. At least I don't have this problem on Windows 7 😕

                1 Reply Last reply Reply Quote 0
                • S
                  steveukrm last edited by

                  I'm using Windows 8. I discovered what the problem was with the 130 error. I was testing data from 2010 and when I opened the chart and attached the ATR indy to check manually I could see that the indy didn't show that far back - that's why the EA was falling over.

                  Thanks for your help though - much appreciated.

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

                  Online Users

                  M
                  E
                  S
                  R
                  E
                  T
                  M

                  11
                  Online

                  146.8k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors