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: First indicator question

      Indicator in fxDreema? I don't believe this, but you can try 🙂 What is the question actually, how to create a global variable? https://fxdreema.com/help/working-with/constants-and-variables

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: How Put ComboBox for constants ?

      I never did anything for enumerations. In fact, I think you are the first one asking for that. But because I know myself, I think I won't do nothing about this soon, because it's not something that I feel urgent or at least interesting (for me) 🙂

      What you can try is this. I only think that it will work, but I didn't tested it and I don't know for sure. Here https://fxdreema.com/studio/MQL4 look lower at the right side where "Custom functions" are. Click on New to create new one. Now, the expected format is a regular MQL4 function that has datatype, name, () and {}. So if you write something else, it will not work. But you can write an empty function and after that function you can write anything. Then in the project you must call that function from somewhere, let's say from "Custom MQL4 code" block. But note that this code will be added somewhere in the lower part of the MQL4 code, so this could be a problem.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: consecutive losses reset

      Time is crazy 🙂 In block 795 the format of the time is in UTC format (integer value). In block 785 you have "Time stamp", which is a string (text). Maybe you don't have compile error, but I don't think it will work that way. So, if block 785 is the one that does not work, this would be the reason. Try to use that variable (candlereset) in Value -> Numeric.

      Also note that block 786 does not depend on block 785 in any way. Block 786 is doing its thing and does not care what block is above or below, it is not part of that "Bucket" idea.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Minutes before market closing

      This option applies for all symbols actually. It's interesting function, I will take a look at it. But why they decided to use "from" and "to" that way... If the function itself was made in a way to return the value you want, it would be easier to use it directly.

      If you are hurry, you can create your own function that uses this one, but returns the amount of minutes until the end of the session... if you know MQL4 a little bit 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • Multiple trades are created one after another?

      This is a very common problem and people often ask me why their EAs produce multiple trades non stop. Here is my answer...

      Variant 1
      The current count of trades is not checked before creating a new trade. Remember that blocks such as "Buy now" and "Sell now" are designed to create a new trade every time they run. If "Buy now" block runs 10 times, 10 trades should be created as a result. So, the idea is to not allow these blocks to run too often. The very first examples here show you exactly that - https://fxdreema.com/examples As you can see, the easiest way to be sure that you only have 1 trade at a time is to connect "No trade" block somewhere above "Buy now" and/or "Sell now".

      Variant 2
      You use "Close trades" somewhere and what really happens is that every time a new trade is created, it is closed immediately after that.

      It's important to remember that every time you run "Close trades" block, it does its job - if there are trades to be closed, they will be closed. So it's important to run "Close trades" only when trades needs to be closed. Look at Variant 1 and you will see that this is also true for blocks "Buy now" and "Sell now" - you only need to run these blocks when a new trade needs to be created.

      Again, you need to use some conditions or filters above blocks "Buy now", "Sell now" and "Close trades". But the conditions above "Buy/Sell now" and the conditions above "Close trades" MUST NOT be true at the same time.

      What people often do is that they connect their "Buy now" and "Sell now" blocks with certain conditions and then they use the same conditions above "Close trades" block. And the result is that trades are created and immediately after that they are closed, because the conditions to create trades and close trades are the same.

      How to fix the problem? It depends on the situation. For example, look at this project - https://fxdreema.com/demo/mt4-buy-sell-buy-sell-opposite-conditions You can see that "Close trades" blocks are used under exactly the same conditions to Buy and Sell. You may say "But fxDreema, you just said that this is wrong...". And again, it is wrong to close trades right after they are created, but if you try this particular expert advisor you will see that such thing does not happen and everything works fine.

      Let me repeat that again - do not allow "Close trades" to run shortly after a trade creation.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Place 3 Break even

      In the Trailing stop block try this option http://prntscr.com/el6d4i

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: How can I "close all trades when balance-equity=-20%"

      It depends. You can compare Balance with Equity or just check the Profit in the Condition block: http://prntscr.com/el61lr If you decide to compare Balance with Equity, use the Adjust field (in More settings). But all this works with the global account equity.

      To check only the profit (or loss) made out of certain groups of trades, then use "Check profit (unrealized)". Those Bucket blocks are yet another way to do the same.

      And after all checks use "Close trades" to close the trades. And of course, by default this block would only close trades made by the same EA. So, if you want to work globally with all trades, then you need to change some of its settings (group number and market)

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Lag between EA and server

      Maybe you have 2 EAs working on the same time?

      There is a setting in the block for server/local time

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Loop bar ema

      There is a block "Indicator moves within limits" that does something like this under the hood

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: About Ask/Bid and custom price levels

      There are 10s of different objects that can be printed on the chart. The simplest objects - horizontal and vertical lines have only 1 coordinate - price (horizontal line) or time (vertical line). But some objects are made out of 3 points, where each point is one price-time coordinate. So Price level 2 and Price level 3 can only be used for particular objects. And even Price level 1 - there is no reason to use this for vertical line.

      Ask and Bid are properties of the price. A horizontal lines are just line placed on particular price.

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

      I think there is a Withdrawal block for MQL5, somewhere at the bottom. But in MQL4 there is no such function unfortunately, so if you are asking for MQL4.... I have no idea how to make anything like that 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: CONSTANTS TYPE

      They are, but at the moment I don't give any standards. It would be great if I define various enumerations, which means that the possible parameters would appear in beautiful way in the EA's input parameters. But there are many many parameters in the blocks and it's a lot of work

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Can an EA be exported into a .dll file?

      No, and I don't know how

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: CONSTANTS TYPE

      @miro1360, I would not recommend that. It's my fault that I didn't disabled these 2 drop-down menus, but I should do that. I don't recommend to send any drop-down value to the input parameters, because their possible values are not official, not very well thought 🙂

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Close on first profitable open

      For each Trade -> check age -> do something else here

      Yes, this works with the age (the time after creation), but I think it does the job. At least I tried this many times and I never wanted to count the time by candles instead of exact time 🙂 Of course I can at least try to add some option in the "check age" block to turn the time into candles count, but do someone really need that?

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: How to delete the PREVIOUS pending order ?

      Well, the information in that Help link is very small I believe. Which means 2 things:

      1. Those people who want to get detailed information will probably not find it there. Bad for advanced people.
      2. Newbies have less to read, because I tried to explain only the essentialc. I believe that if a newbie takes some time to read the Help and try the Examples (https://fxdreema.com/examples), he will understand what is going on pretty quickly.
      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: loop for objects

      You know what, I just saw that there is a property OBJPROP_CREATETIME for the objects. I don't know since when this property exists, but I really see it for the first time now. I think I can do something with it, because at the moment the situation is not very good.

      So, how it works now. By default MQL sorts objects by name. ObjectsTotal() gives us the number of objects, but then when we start to load them one after another we see that they are sorted by name, not by time of creation. That's why in "For each Object" you can see A-Z and Z-A sorting methods.

      And this type of sorting works in theory, because object names are normally made out of some text (prefix) + unique number at the end. And because that unique number for each next object is +1 from the number of the previous object, as a result you kinda have sorting by time.

      But there is one ugly problem. Let's say you have objects with names Arrow 1, Arrow 2 and Arrow 10. What you think is "Okay, they will be sorted like this - 1, 2 and 10". But no, they will be sorted like this - 1, 10 and 2 at the end. That's why it's better to work with names that have bigger numbers.

      It will probably be also ugly if I decide to put that property OBJPROP_CREATETIME into the game. Because then I will need to first get the creation time of all objects, put all these times in some array, sort that array and start picking objects out of that array. Which will make everything much slower. I didn't tested it and I don't know how much slower, but it will be slower.

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: i use the no trade and once ber but there problem ?

      Block "Once per bar" can only pass 1 time per bar. You can put this block directly on top level in "on Tick" (which means that the block will run many many times, maybe few times per second) and it will pass only 1 time per bar.

      https://fxdreema.com/demo/mt4-once-per-bar

      When you use the crossover options in "Condition" (x> and x<), you could have multiple signals (passes of the block) in the same candle, but then after that candle closes all signals stop, at least for the whole next candle. This is because of the way these crossovers are detected, you just can't have crossover detected in one candle and then another crossover on the very next candle.

      Again, while in the same candle you will see many many signals (passes of the Condition block), because the crossover detection is made out of 2 simple IF checks, as it is described here: https://fxdreema.com/help/working-with/crossover That's why the "Once per bar" block is normally used before or after this Condition block, as described here: https://fxdreema.com/demo/mt4-once-per-bar

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: Close on first profitable open

      Maybe something like this: http://prntscr.com/eirqub

      posted in Questions & Answers
      fxDreema
      fxDreema
    • RE: 3 consecutive losses

      Also take a look at this block "Skip Ticks"

      posted in Questions & Answers
      fxDreema
      fxDreema
    • 1
    • 2
    • 94
    • 95
    • 96
    • 97
    • 98
    • 374
    • 375
    • 96 / 375