fxDreema

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

    Best posts made by fxDreema

    • RE: Trailing stop not working

      The Trailing stop block needs to run on every tick (in most cases, this is not mandatory). Just placing the block somewhere does not guarantee that it will do the job continuously. When I first made this block, it was automatically working all the time. But then I decided that the person should be able to decide when to run this block by placing it under "Hours filter" or other blocks.

      https://fxdreema.com/demo/mt4-trailing-stop

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Can you use Heiken-Ashi candles as normal candles?

      Somewhere in Condition block you can find Heiken-Ashi indicator. This one is listed with the built-in indicators, but uses external .mq4 file (which comes with MetaTrader anyway). I programmed this, because otherwise it's tricky to work with the buffers from this indicator

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: How create 1-2-3 breakout based on Zigzag?

      Well, you can play with the Zig-Zag indicator that is in the list of built-in indicators. This indicator comes with MetaTrader as an example indicator, but long time ago I decided to add some options to it. But to be honest, I have no idea how this indicator should be used 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: important questions about pending order ?

      I'm not sure I understand... Your pending order is placed at some price and then this pending order is triggered on the server, but with the spread at the time.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Loop through bucket of trades

      MQL4 is relatively easy in my opinion and that's why so many people are making EAs and Indicators. Yes, you need to know variables, functions, data types, "if" and "for"... but that's almost everything. Then you only need to go to the MQL4 documentation and see what functions can you use.

      Now MQL4 is very much like MQL5, which includes Object Oriented Programming, but for a simple loop this is absolutely not needed. You basically need to do something like this:

      for (int pos=0; pos<OrdersTotal(); pos++) 
      { 
           if (OrderSelect(pos, SELECT_BY_POS) == false) continue; 
           // do something here using other functions like OrderLots(), OrderStopLoss(), OrderTicket()...
       } 
      

      OrdersTotal() gives you the current count of orders (trades + pending orders). Let's say you have 3 trades.

      The next job is to load the first one and do something with it, then load the second one and do basically the same thing with it, and then do the same with the third. This is what this "for" cycle does. "pos" is just a variable, which is 0 in the first iteration, 1 on the second and 2 on the third.

      OrderSelect() obviously select an order by position number. You got the position number from "pos". Just imagine that MetaTrader has a database (table) of all orders and they are sorted by time. I think 0 points to the oldest one. So what OrderSelect() does is to select the order from a certain row of the database.

      And OrderSelect() is needed, because it "fills" all the other functions with data. For example OrderLots() - this function gives you the lot size of the currently selected order. Remember that you can have many many orders at the same time and that's why you must select one before working with it.

      And the row where OrderSelect() is used does something else - if OrderSelect() returns false (which means that for some reason MetaTrader cannot select order with that "pos" number, then the "for" loop would continue (the rows below the word "continue" are skipped).

      If for example you see the word "break" in a loop, this means that the loop breaks at that point, or in other word that word sends you outside the loop, it finishes the loop in the middle of the work. This is useful when you don't have anything else to do in the loop and it's better to escape it.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Select Object By Name - Several Objects

      Well, each object has different name and you can't have 2 or more objects with the same name. So if you know one name, you can only get/set information to only 1 particular object, if exists. If you want to do something else over multiple objects, then you need to find those objects.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: tweet order information on twitter

      I have no idea, I can't find anything about "twitter" in the MQL documantation. I guess it can be done with the help of some other tool which accepts a signal in some form and connects with Twitter. An EA can send notification to a phone or it can send HTTP request to particular web address, but I don't know the rules of Twitter.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: help for find buffer and mode of xtreme_binary_robot_channel

      You can obviously have indicator without any buffers. This is how its made, you can see that the code is full with "Object..." functions - so it doesn't use buffers, it creates objects on the chart. The normal way is to fill the buffers with data and then from the information in them MetaTrader decides what to draw, but in this case the indicator tells MetaTrader to draw objects.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: count open trades

      https://fxdreema.com/examples#Bucket-of...

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Variable updating ?

      What line?

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Slow backtesting

      You are asking for strategy tester? 🙂 Who will do that and why 🙂

      Unfortunately this is true. Indicators are slowing the process and also EAs generated with an EA builder are normally bulk and heavy. But you know, it also depends on the logic itself. To make things faster, try to Not run some blocks all the time if this is not necesarry. This depends on the strategy of course. For example you can put "Once per bar" somewhere where you don't really need something to work on every tick and the result will be the same if it runs once per bar.

      EAs are slow on backtesting, because certain functions are running again and again, millions of times. There are many ticks to be backtested, and that's why everything is slow as a whole. But if you imagine that you only have 1 tick, then everything is ultra fast.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Timeframe as input

      For the Constant that is the timeframe, the data type should be ENUM_TIMEFRAMES instead of double. And the default value should be something like PERIOD_H1.

      https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Multiple Breakeven points (Not need trailing)

      http://prntscr.com/i08jnb
      alt text

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Condition for spread

      In "Value", where "Numeric" is, there is "Pips" as well. There is this option there to get a value "as price fraction", by which I mean the difference between two prices, exactly what ask-bid is.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Trading multiple pairs with 1 chart

      But of course it's a little bit different than having the same EA on different charts. Remember that if you put one EA under say EURUSD, then it only works because of the EURUSD ticks.

      Check this block: Set Current Market" for next blocks

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Help me open the csv files in SPSS :)

      To be honest, I don't have very much experience with csv files, I only know that they are "comma separated" and if you open the file with text editor, you will see that the format is very simple. I also don't know what this SPSS expects, I only heard of this program some years ago 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: manual trade closed by expert

      The idea is that manual trades have magic number of 0. You can for example make an EA that only works with such trades if you only do this: 0_1520882525647_99a722d3-c500-47d4-b96b-2e8c0cb3e083-image.png

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Understanding the "Indicator appear" block

      In this block you load a custom indicator and you choose one buffer. I don't care what the indicator is and what is the number of the buffer, this block does the same. It expects the values of the buffer to be EMPTY_VALUE or 0 most of the time, and only from time to time to be something different, lets's say the price value.

      The idea is that every buffer has as many values as many candles there are on the chart. If each value is a positive number that can be seen on the chart, then you see something like MA line. But some indicators don't want to draw continuous line, so they use that EMPTY_VALUE value, which is a MQL constant that represents the biggest possible integer value.

      "Indicator appear" checks the indicator every time it runs and remembers its last checked values. If the last checked value was EMPTY_VALUE and the current value is say 1.2345, it passes.

      I also set it to work with value 0, because some indicators use 0 instead of EMPTY_VALUE.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: USING THE TESTERWITHDRAWAL() FUNCTION FOR MODELING THE WITHDRAWALS OF PROFIT

      You know, I have no idea. This "Withdraw" block only exists in MQL5, because only in MQL5 there is a function for that. But it is a simple function, so this block is very very simple. I checked it now, it shows some withdrawal action, but I don't know how it works when optimizing. You may find something more interesting in their website - https://www.mql5.com/en/search#!keyword=testerwithdrawal

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Moving to another VPS

      I don't require a lot, the current system has only 2GB of RAM on Windows and the CPU is low most of the time. The HDD speed is important, because the database is stored on the disk and of course we don't want slow reads and writes. I mean, too slow, because we know what normal HDD drives are capable of. For example, here are few tests from my personal PC, from the current VPS and from the new VPS:

      Personal PC:
      0_1523439430647_61686eae-3a12-4d68-b6f6-e12cae79dd97-image.png

      Current VPS:
      0_1523439453205_bce05650-7780-4bbd-9cd1-68dc9603dbee-image.png

      New VPS:
      0_1523439467710_202524b2-8c67-4d48-bb19-34e9bf17de3b-image.png

      The new VPS shows better numbers for 4KiB, but the numbers for Seq are so low that they don't look normal to me.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • 1
    • 2
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 9 / 14