fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. MetaTrader
    3. Topics
    M
    • Profile
    • Following 1
    • Followers 0
    • Topics 20
    • Posts 72
    • Best 1
    • Controversial 0
    • Groups 0

    Topics created by MetaTrader

    • M

      How to get the TicketNumber or select the trade which triggered OnTrade
      Questions & Answers • • MetaTrader

      3
      0
      Votes
      3
      Posts
      1124
      Views

      M

      or this? I am not sure what exactly are you asking ๐Ÿ˜„

      0_1538055734611_02bed28c-614d-41ff-8ba6-8cd753075357-image.png

    • M

      Ugly behaviour on accidently scrolling
      Questions & Answers • • MetaTrader

      2
      0
      Votes
      2
      Posts
      523
      Views

      fxDreema

      Yes, this is a commont problem, not only for this website. It's because the mouse is positioned oves the input field while you are scrolling the page. I can think of some JavaScript trick to fix this, but I can't guarantee that I will find a good solution ๐Ÿ™‚ One way is probably to allow increment/decrement on fields only when you click on them, so they will not be affected when you just put the mouse over, but I don't like that, because I like to increment/decrement them without clicking on them ๐Ÿ™‚

    • M

      how to declare parameters for custom blocks
      Questions & Answers • • MetaTrader

      4
      0
      Votes
      4
      Posts
      1943
      Views

      M

      Thanks a lot for clarifying

    • M

      Custom blocks seem to be disabled
      Bug Reports • • MetaTrader

      9
      0
      Votes
      9
      Posts
      2687
      Views

      fxDreema

      I never tested long names, this is intresting

    • M

      Links to users broken in shoutbox
      Bug Reports • • MetaTrader

      1
      0
      Votes
      1
      Posts
      511
      Views

      No one has replied

    • M

      Wishlist: Font for Block "Comment"
      Questions & Answers • • MetaTrader

      1
      0
      Votes
      1
      Posts
      501
      Views

      No one has replied

    • M

      Custom Block Help -> TypeError : Cannot read property 'trim' of undefined
      Questions & Answers • • MetaTrader

      7
      0
      Votes
      7
      Posts
      2637
      Views

      M

      Hi any Idea how to solve this?

    • M

      Lost all my projects when I tried to use this block
      Bug Reports • • MetaTrader

      1
      0
      Votes
      1
      Posts
      400
      Views

      No one has replied

    • M

      Current Block number in Custom Blocks
      Questions & Answers • • MetaTrader

      3
      0
      Votes
      3
      Posts
      1235
      Views

      M

      @fxdreema said in Current Block number in Custom Blocks:

      ly. It gives you the block number. Or I'm not sure, to be honest :))) Because now there are at least two different sets of block numbers ๐Ÿ™‚ But I'm currently using

      Thanks I will modify my code. What do you think about taking my loop as a Standard Block
      I guess I am not allone with the need to have a simple loop and knowing the current iteration

    • M

      Loop through arrays with custom block
      Tutorials by Users • • MetaTrader

      2
      0
      Votes
      2
      Posts
      2512
      Views

      I

      What trade strategy are you trying to do? There may be an easier way.

    • M

      How to create custom block for a Between checker
      Bug Reports • • MetaTrader

      4
      0
      Votes
      4
      Posts
      1336
      Views

      fxDreema

      Outputs are not defined there. Outputs are defined here with ~next~ and ~inext~ http://i.prntscr.com/925dfd57926e46abb2 ... a47a1e.png

    • M

      Vote for a new desktop version!
      General Discussions • • MetaTrader

      5
      0
      Votes
      5
      Posts
      1779
      Views

      fxDreema

      I can admit that it's not only the connection right now. There is some weird error that appears from time to time and Apache restarts. But I'm almost done with the new NodeJS version, so I hope that this problem will disappear with Apache/PHP. Well, I expect problems with NodeJS initially, as always, but at the end I think everything will work very good ๐Ÿ™‚

    • M

      How to define constants without making them extern?
      Questions & Answers • • MetaTrader

      5
      0
      Votes
      5
      Posts
      1809
      Views

      M

      I wrote a small custom function for a common problem:
      Often you want to know if a variable is changed since last tick or so.
      Usually you start tricking around with myVal and myOldVal or something crappy. If it comes to a handful values you want to compare this way becomes ugly.
      We need a short time memory and so I wrote this:

      bool isChanged(int index, double value) { static double memory[]; if ((index +1) > ArraySize(memory)){ ArrayResize(memory, (index+1)); memory[index] = EMPTY_VALUE; } if (memory[index] != value){ memory[index] = value; return (true); } return (false); }

      now you can use it like ```
      isChanged(MY_INDEX, myJumpingValue)

      it automagically stores and compares the value and returns true if the value is changed. And I use constants for the indices because mql4 has no associative arrays like php -> you can not use a string as index. To know if one of the values changed i can do something like this:

      const CHANNEL_HIGH = 0;
      const CHANNEL_LOW = 1;
      const TRIGGER_HIGH = 2;
      const TRIGGER_LOW = 3;

      double hi, lo, thi, tlo;

      // some code / blocks for setting the variables

      if (isChanged(CHANNEL_HIGH, hi) || isChanged(CHANNEL_LOW, lo) || isChanged(TRIGGER_HIGH, thi) || isChanged(TRIGGER_LOW, tlo){
      do_some_magic();
      }

      of course you can use the same in dreema's condition block. leftValue Boolean true und in the adjust

      && isChanged(CHANNEL_HIGH, hi) || isChanged(CHANNEL_LOW, lo) || isChanged(TRIGGER_HIGH, thi) || isChanged(TRIGGER_LOW, tlo

      Thats why I asked for the constants ;) But I understand your reasons and I will switch extern to const in my code before I compile the production version.
    • M

      How can I remove Comments
      Questions & Answers • • MetaTrader

      12
      0
      Votes
      12
      Posts
      4121
      Views

      l'andorrร 

      Is it happening on MT5 maybe? I know that happened some time ago but it was fixed.

    • M

      How to check if pending order opened?
      Questions & Answers • • MetaTrader

      2
      0
      Votes
      2
      Posts
      744
      Views

      fxDreema

      I guess I have to make filter block such as "Pending order triggered" or add some option in "Trade created". But if you are using "Trade created", it should not pass if pending order is created. I just tested it and it works as I expected ๐Ÿ˜ฎ

    • M

      How to include a mqh file
      Questions & Answers • • MetaTrader

      5
      1
      Votes
      5
      Posts
      1867
      Views

      fxDreema

      This is true ๐Ÿ™‚ Check this post - post/10298

    • M

      Two compiler warnings in Trailing Block
      Bug Reports • • MetaTrader

      4
      0
      Votes
      4
      Posts
      1310
      Views

      fxDreema

      Copy of the project data is automatically embedded at the end of all .mq4/.mq5 files that you create (it is compressed, that's why it looks weird), so you have the actual code + fxDreema project data in the same file. Imagine that those .xml files are now .mq4 and .mq5 files.

      I change things sometimes and I even change the way that project data looks like. Old project data eventually becomes in "wrong" format for the new version of fxDreema, but I have functions that convert it to the newest version. Now the local version generates old version of that data and the web version can work with it, but the opposite is not true. If you try to import .mq4 file from the web version into the local versions, it will fail, because the local version is not aware of the new rules.

    • M

      Radoslav told me about "makros"
      Questions & Answers • • MetaTrader

      2
      0
      Votes
      2
      Posts
      769
      Views

      fxDreema

      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)

    • M

      Looking for a Crossing during last n candles
      Questions & Answers • • MetaTrader

      4
      0
      Votes
      4
      Posts
      1125
      Views

      fxDreema

      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.

    • M

      MagicStart + Random?
      Questions & Answers • • MetaTrader

      8
      0
      Votes
      8
      Posts
      1664
      Views

      fxDreema

      EDIT: sorry, I wrote something here in the wrong topic

      Well, yes, this block can do what it is supposed to do, I guess

    • 1 / 1