fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. fxDreema
    3. Posts
    • Profile
    • Following 0
    • Followers 691
    • Topics 32
    • Posts 7485
    • Best 277
    • Controversial 18
    • Groups 1

    Posts made by fxDreema

    • RE: Looking for a Crossing during last n candles

      People are always asking me how to make indicator in the EA, because these calculations are basically this 🙂 And I always explain that the best is to get signals directly from indicators. The difference is that indicators (if well written) does not recalculate on every tick, while in the EA this is hard to make, especially in EA builder.

      Anyway, I finally added this field, which allows us to calculate some things - http://prntscr.com/9egr7i - but your scenario (to detect that only 1 crossover happened in the last N candles) is more complex and specific and I don't feel like I want to do it, at leat not somewhere in Condition 🙂

      Otherwise the logic would be to make "for" loop and count crossovers from below and from above and then to pass only if this count is 1. If the count is 2 - break the loop.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: How to terminate EA if target Equity is reached?

      I just found another issue in "For each Trade" and fixed it. It was all in the section of code responsible for sorting trades by profit. By the way I think you don't need that at all, mostly because this sorting also takes more time. But thank you for using it, because as a result I spotted these issues 🙂 Well, there is still a problem if too big OCO pending order is used, but I have no idea how to handle this anyway, maybe stopping the whole EA (which actually happens with these errors).

      I put the EA with -2 (but without it) to 1 year backtest and now it looks that it works.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Formula Result

      What "Formula" block does is simple mathematical operation using two values (on the left and on the right) and then it writes the result in some Variable (the one you put in "Put the result into this Variable). After that you have new value in this Variable.

      Variables can also be incremented with "Modify Variables", like this http://prntscr.com/9egdkr or with "Custom MQL4 code".

      posted in Bug Reports
      fxDreema
      fxDreema
    • RE: ATR Stop-Loss

      When something does not happen as expected, the first thing to do is to look at the error logs. Do you have errors?

      By the way I don't like the left part of the project, those pink blocks are not connected properly. This is how they work: https://fxdreema.com/demo/mt4-loop-how-it-works

      Also, you don't need this "Once per tick"

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Radoslav told me about "makros"

      The only other keyword is %, which is translated to /100 and these only works for "Adjust". Also in all input fields you can use pure MQL code (well, somehow hard to do that in string fields because of " " that are automatically added afterwards)

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Looking for a Crossing during last n candles

      If at the moment EMA20 > EMA5 and for the fifth candle EMA20 < EMA5, then this means that there was a crossover somewhere in between. This is what the "Cross width" parameter do actually (although I keep this parameter only for compatibility with old projects), but I will recommend to use two blocks instead 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: How to terminate EA if target Equity is reached?

      Now the problem is totally different and is here http://prntscr.com/9e7kty
      http://i.imgur.com/dUSTLUa.png

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Flag textual value

      The yellow output is the opposite case. You can also use some Variable. In fact, each "Flag" block uses it's own variable inside to store it's data.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: How to terminate EA if target Equity is reached?

      I only added the newest MQL compilers in built 100, but all blocks are old.

      The last things I did was to enable Strict mode and fix many small issues here and there. As a result at least 2 unexpected problems were reported and in both cases everything worked if I disable Strict mode (remove #property strict). But I tested your idea with and without Strict mode and it failed in both cases, so now I believe that at least I didn't introduced a new problem. Whatever it is, it is old I think. And the problem appears in one function that should close OCO pending orders (when one of them closes => close the other one). And it normally works, but not when one of the orders failed to open because of too big lot size. At least this is what I found to be the problem. I test with initial $1000 dollars and 1 lot appears to be too big.

      So.. do you see the same thing on your side? Do you have pending order deleted because it's lot is too big, or I am looking at something else?

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Pass block

      No, it is intended to be string value, words are allowed. I can even recommend to use words in some situations (when you use the ID in another block). I tried using word and it worked for me, so your problem is something that I am not aware of and that's why I need more information

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Custom Indicator error

      Now you deleted this indicator, but the problem was probably the same.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: How to terminate EA if target Equity is reached?

      This problem is from the function which is responsible to delete the second OCO pending order when the first one is opened. And normally everything works fine, but in your situation this problem follows another problem. Because you use big lot size, when one of the pending orders is reached, it can't be opened. Instead, it is deleted but for some reason it still can be selected with OrderSelect() in MQL4. That's why this error appears. Before OrderDelete() there is OrderSelect(), but OrderSelect() successfully selects the ticket and then OrderDelete() fails to delete it.

      And I'm not sure what to do in this situation. That pending order is not opened as it was expected and because ot that the strategy fails. The error that follows does not allow the EA to continue working, but this is probably better, because do you need such broken EA to continue working?

      Even if I mute this error, what to do with this faulty pending order, this is my question? 🙂 For trades, if you request such a big lot size, the EA just calculates the biggest possible lot size and uses it, but pending orders are opened on the server.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: How to terminate EA if target Equity is reached?

      Yes, I was thinking about another problem. This one is still there and I am investigating it now. It will be fixed eventually.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Screen size on Mac

      I think I fixed it now. Only there is some weird problem in IE and I don't recommend using it 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: cannot convert enum

      What I did in Mondey is for good, it was only something that reveals small mistakes. The calculation is still the same, but now it shows the real number. I know it sounds stupid, but I also had many problems with values that look like 10 but are in fact like 9.9999999999991. I can't explain why this happens, it's something technical with floating numbers in C++. Check this: http://stackoverflow.com/questions/2909 ... -precision
      In other words, in the past you saw rounded but false numbers and now you are looking at their real value.

      That's why they provide NormalizeDouble(). Now I want to normalize the data that can be get from Condition, but it's not as simple as to write NormalizeDouble everywhere, because this function has second parameter for the number of digits after the point and this depends of what kind the value is. If it's lot size, then 2 digits, in case of price - 2, 3, 4 or 5 digits depending on the market. If it's the value of custom indicator... absolutely depends.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Pass block

      Can you give me .mq* or shared project link? I tried something like this, but it works for me

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: HELP!!!! fx dreema crashed

      I need more details to say what is wrong 🙂

      posted in Bug Reports
      fxDreema
      fxDreema
    • RE: Custom Indicator error

      I can see that those words are used as data types, but those are not valid data types. There are no datatypes like MOVE, DET or LVL. If those are enumerations defined in the indicator, I don't really know how people use these indicators in EAs. What's defined in the indicator is only visible there, not from the EA. You can try with integer values. Enumerations are actually integer values like, 0, 1, 2, 3...

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Screen size on Mac

      It looks that it's fine in Chrome, but in other browsers not. I'm not sure what can I do for this, but I will try to fix it. It's ok when I put the horizontal scrollbar at the top by the way 🙂 I can suggest to put some block below the lowest one and it will open some space.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: cannot convert enum

      I think that it works now.

      Looking at those long numbers, tell me if one of them comes from some block and what it represents... I mean, if you get the value directly from somewhere, but not if you do some mathematics somewhere. I want to normalize those numbers where I can. I can't help much when +,-,* or / is used somewhere and in this case I can suggest NormalizeDouble().

      posted in Questions & Answers
      fxDreema
      fxDreema
    • 1
    • 2
    • 184
    • 185
    • 186
    • 187
    • 188
    • 374
    • 375
    • 186 / 375