I recently added a new option to be able to hide the indicators after backtest. I decided to to that after I saw that they finally added such function in MQL5. Otherwise this function existed in MQL4 for a long time and I don't see possible problems with it. What is the error actually?
Posts made by fxDreema
-
RE: Error when attaching EA to chartposted in Bug Reports
-
RE: What Block Should Use?posted in Questions & Answers
This reminds me of adding to volume on loss, here is an example for this. This example works on every tick, so it adds new trade on the first tick where the distance is detected, but if you want to do something only on the first tick of each candle, just place "Once per bar" on the top - or above block 3 in this example.
-
RE: Custom Script for simple Market Orderposted in Questions & Answers
You want MQL code? Search for OrderSend() function in the documentation. In MQL4 it is very easy to use, but in MQL5 it's not as easy.
-
RE: Virtual Stops break after restartposted in Questions & Answers
I created one trade, restarted and everything is ok. Unfortunately it is very hard to find the problem when it doesn't show easily, and especially when it doesn't show to me. Most of the time if the problem happens to me at least once, then I am able to make tests and find out where it originates.
-
RE: i want code in fxdreema ?posted in Questions & Answers
I lost the idea on the 3rd row and especially at the words "after after tomorrow"
If you can describe the strategy in another way... 
-
RE: Questions about the 'Bucket of close trades' block.posted in Questions & Answers
So, this block uses all those filters to select any trades that match the filters. Then somewhere in "Condition" ... you will find where... the selected trades are used to make the calculations - to sum up the profits for example.
Shift in time - this is used if you want to adjust the time a little bit. I think you don't need this here.
Not more than n history trades - this is the maximum number of trades that could be selected. In your profile history you may have 100s of closed trades and you don't really want to select all of them. So normally you should have some number over there. But you have time limits already, you probably know how much trades you could have in this amount of time.
The configuration is emptied because of the fact that every time the block runs, it selects the trades again. So when the time limits change, it will select different trades.
-
RE: I have an icustom script from an author of an indicator, but I have no idea what to do with it? The buffers were not registering when I manually entered them...posted in Questions & Answers
iCustom() is a function that loads custom indicators and gets their values. In this case the indicator is called "Choppiness Index", you probably see it as a file named Choppiness Index.ex4... assuming that we are working on MT4. The indicator has 3 input parameters, all with type "int" and values 14, 1, and 1. The last two numbers are the buffer index (1 - the second buffer) and the candle index (0 - the current candle). If this is MQL5, then all the numbers are input parameters, because iCustom() is used in a little bit different way there.
I will suggest to manually add this indicator in "My Indicators". If you have its .mq4 file you can even "upload" it. Then you don't need to write this function anywhere.
-
RE: Only open new trade if last trade is closed x minutes beforeposted in Questions & Answers
I will suggest this combination of blocks:

The first block loads the last closed trade. Then "check age" checks the close time of that trade. And then after "check age" you do whatever you want.
-
RE: Assign Magic number to manually taken tradesposted in Questions & Answers
When you create a new trade manually, you don't have the option to set the magic number. This number exists to be used by expert advisors anyway. The only way to make a trade with magic number different than 0 seems to be to make it with an EA or a Script. Also note that you cannot change that number, it it set once when the trade is created.
-
RE: problem when rich TP open onother position...posted in Questions & Answers
In your conditions you ask whether or not the indicator is green or red at the moment. Well, technically you are checking whether or not the values in the buffers are different or equal to EMPTY_VALUE. The thing is that obviously the green (or red) line stays green (or red) for multiple candles in a row. What you actually want is to detect when the indicator line turns green or turns red, you want to do something on the first "green" or "red" candle.
You can try "Indicator appear" block, this one detect when the buffer turns from EMPTY_VALUE to something else. Or try a condition like this:
Indicator x< (Numeric -> Value) EMPTY_VALUE
or...
Indicator x> (Numeric -> Value) 0
I didn't tested these conditions now, I might be wrong, but I think they will work.
-
RE: Virtual Stops break after restartposted in Questions & Answers
Lately I rewrote some functions responsible for Virtual Stops and I expected them to be more stable now, but obviously something is still wrong. The problem is that it's often very hard to find what is the actual problem, sometimes the problem doesn't show every time.
And it looks that I'm late, it's already Saturday here and markets are stopped, I can't test it, sorry for that. So, it's enough for me to make an EA that creates a trade on USDCHF, then restart the EA and the stops will be gone? If not, can you give me some simple EA and direct instructions for how can I replicate the problem on my MetaTrader?
-
RE: Possible bug at modifying variablesposted in Bug Reports
If the number is 2,147,483,647, aka EMPTY_VALUE, then this value means that nothing is printed at this candle, the indicator doesn't have a value that can be used for something at that moment.
-
RE: Does a Partial Close incur spread?posted in Questions & Answers
What I know is that in MQL4 the function OrderClose() allows you to set the lot size to be closed, which makes the function capable to partially close the trade. When that happens, in the list of trades it appears that the original trade has been fully closed and a new one has been created (with smaller lot size). Both trades have different ticket numbers, so visually you can't even tell that it was a partial close, but it's a little bit different on a lower level. I'm not sure, but I think that it's better to partially close the trade instead of fully close and open smaller amount after that.
-
RE: Pending orders queryposted in Questions & Answers
If each EA works on a different Symbol, you can work with the same magic number, no problems.
So, the problem is that "Buy pending orders in grid" is set to create 5 pending orders, but it doesn't? In this case, do you see some error messages? For the deletion my question is the same - do you have error messages or it seems that some block doesn't work at all or it does something, but not all?
-
RE: Using time in formulaposted in Questions & Answers
If you want to get the current hour, for example if now is 13:05 and you want to get 13, then in MT4 you can try this:
TimeHour(TimeCurrent())... where TimeCurrent() gives you the current server time as a number of seconds since 1.1.1970. TimeHour() obviously gets that number of seconds and gives you the current hour back.
Instead of TimeCurrent() you can use TimeLocal() or TimeGMT().
It's interesting that TimeHour() doesn't exist in MQL5, so it is a little but more complicated.
-
RE: Smoothed Heikin Ashiposted in Questions & Answers
@b-seow said in Smoothed Heikin Ashi:
Heiken_Ashi_Smoothed.mq4
Better find out what is inside the output buffers with that Trace block. Here is an example of how to use it: https://fxdreema.com/demo/mt4-trace-multiple
What I can tell you for Heiken Ashi is that even the built-in Heiken Ashi indicator (that comes with MetaTrader) is a little bit weird. The information in the output buffers is not that easy to use. There is also difference between MT4's version and MT5's version of this indicator, they don't output the same kind of information. So, in fxDreema I added extra layer of input and output parameters, so the indicator can be used in the same way in MT4 and MT5, easily.

Look at those input parameters above... they don't exist in the original indicator that is used.
Look at how buffers switch from top to bottom and from bottom to top (and the pink and yellow lines cross):

How to detect the first red candle... it appears when the Buffer 0 (the yellow line) crosses Biffer 1 (the pink line). Try something like this:

-
RE: 2 decimal placesposted in Questions & Answers
I'm aware of this problem and I tried to minimize it, but it looks that it just happens, even if you are using all the functions that are supposed to fix it. Take a look at their documentation: https://www.mql5.com/en/docs/convert/normalizedouble
Please note that when output to Journal using the Print() function, a normalized number may contain a greater number of decimal places than you expect.
-
RE: Payment Declinedposted in Questions & Answers
I know, but what access could be denied to pay with bit?

