Connect this block to some other, let's say "Pass". This "Pass" block does nothing at all, but it's used when you want to run another block that is normally not connected to anything. The rule is that for a block to work, it must be connected with another block. All disconnected blocks are removed from the output file.
Posts made by fxDreema
-
RE: Why is my trailing stop not working?posted in Questions & Answers
-
RE: Trailing stop for all existing trades on conditionposted in Questions & Answers
Just use the Trailing stop (each trade) block. There are many options inside, one of which is for something that I call Trailing Start. This is where you can write this offset of 50 pips, so no trade will be touched until 50 pips of profit is reached.
Set Trailing Step to 1 pip.
And for Trailing Stop you have the option to use % values. You can see you have "% of Profit" option and also other options.
-
RE: My Project has disappearedposted in Questions & Answers
Well, there is always some previous history point that works. I clicked on the previous one and many blocks appear.
I of course apologize about the problem. Unfortunately those kind of problems are very hard to detect, because they seems to happen without apparent reason and they are rare.
-
RE: Compilation errorsposted in Bug Reports
I have problems to export this project, because I don't have the indicator that is used in it. Can you copy that part of the code where the problem appears? Or do you know which block produces the error?
-
RE: OPEN POSITIONS USING HTTP_RESPONSE - Can FXDREEMA DO THAT ?posted in Questions & Answers
You can find this "Send HTTP request" block, which is designed to send GET or POST data to a server with up to 10 key pairs. So yes, you can send those 4.
if there is a response from the server, after this block you can read certain value for example from Condition -> HTTP response. But note that the expected format for the response is in delimiter-separated values, where the delimiter is defined in "Send HTTP request". For example the response could be (let's say the delimiter is ;
value1;value2;value3value1 comes from key 0, value2 is on key 1 and value3 is on key 2
-
RE: Compile Error: Constant expectedposted in Questions & Answers
I don't see that there is a problem with "float". I tested this, I put "float" constant in this "Risk percent" field and I got no error. But I got that "Constant expected" error immediately when I checked the checkbox. That checkbox is obviously not checked on the screenshot, but I assume that you have checked it in your actual project at some time and because of that you saw that error. And my explanation is this...
Don't put a Constant in an input field and then check the checkbox. Because the constant is an input parameter for the EA, there is no need to also check it as such. When you do both things, the EA builder does not check for that and as a result you see an error when compiling. This is some kind of bug that I am actually aware of. But I always recommend to use the checkboxes only for quick tests when you are lazy to create a Constant, but to use Constants when you finally decide to have official input parameter.
-
RE: Loop through bucket of tradesposted in Questions & Answers
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.
-
RE: Divide by zero bugposted in Bug Reports
With this particular option you must have some SL, because the lot size is calculated from SL. The bigger the SL, the lower the lot size. But with SL = 0 you can't calculate lot size... it should be infinity or something like that. Maybe you need some other MM.
-
RE: Type of constantposted in Questions & Answers
string instead of Text, but what you are trying to do is not actually possible. Variable (or constant) is something that has a name (Delta_plus for example) and behind that name there is a value. That value can a number, a string or even an array, but in all cases the variable is only a reference to that value. You are trying to assign mathematical operation to a variable, which is not possible in any programming language that I know.
Instead, just make int or double constant with value of 1 and in the Adjust field write something like + Delta_plus pips
-
RE: Error 10030.posted in Questions & Answers
Oh, not again... This happens on a regular basis. Some person from Brazil complains that MQL5 gives him errors, then I go to fix it, then it works for few months (and few MT5 updates) until another person from Brazil detects new error.
On which symbol and broker does that happen now?
-
RE: Once a day at certain timeposted in Questions & Answers
There is a block Once a day and there are few options inside. You can also do it like this Hours filter -> Once per bar. Or Time filter, or some other combination of green blocks.
The idea is this - you want to have some small period of time, let's say 1 minute, in which period your block(s) must only pass 1 time. Some period is needed, because you can't just ask for 19:05:00. Remember that the EA does something when ticks are coming, but if for some reason you don't receive a tick at 19:05:00, you will miss it. So you need some period of time in which you can be sure that there will be ticks, do the job on the first one and forget about the rest. In Once a day, when you are using the Hours filter option inside, that period is 1 minute, so it's ok.
-
RE: ea stop making orders at 162000$posted in Questions & Answers
Error with code 2 is listed as a ERR_COMMON_ERROR in the documentation. This error says something like "there is something wrong going on, but I don't know what".
This is backtesting, right?
-
RE: Loop through bucket of tradesposted in Questions & Answers
I get a little bit scared when I see people trying to "enter inside" the blocks that I have made

Isn't this already too complicated? I think that sometimes it's easier to just write a custom block instead of using 10s of system blocks. Especially if you know MQL. Making "for" loop in a code probably takes few seconds more, but then you can easily read that code in the future.
I mean, if you connect 10-20 blocks and you are looking at them in the future... you must open each one of them to see what's inside and understand what is going on. Compared to just looking at 10-20 rows of code for some relatively simple "for" loop.
I probably don't fully understand what you are trying to do here, but isn't it possible to forget about the groups and to write some "for" loop in MQL that automatically works with them?
-
RE: Cryptocurrencies are exploding these daysposted in General Discussions
Well, I'm not talking about trading, I'm talking about just having some cryptos. And by the way, after I wrote this Bitcoin and company gained even more value. I think that even if Bitcoin (and others) go down let's say 50%, they will eventually return back and make another records one day. This is new technology in general, but in the same time Bitcoin is (relatively) old and tested, so I see a good potential now. More than that, many people are predicting collapse of the US dollar very soon, which is much more possible.
I am personally ready to work with some kind of decentralized currency. I mean, if I can use Bitcoin (or something similar) everywhere, I'm ok with that. Unfortunately there are still some issues with Bitcoin now, but I hope they will be fixed eventually. And when some cryptocurrency becomes easy enough to be used from regular people, I think that its value would first grow and grow until most people put their hands on it.
For me cryptocurrencies are similar to Tesla. Tesla is also new technology, there are also some problems and the adoption of these new cars is still a little bit slow, but this is the future without any doubt. I'm basically sitting and waiting for all the cars to become electric and I'm 100% that this will happen in few years (but at least 10 years in my small slow country)

-
RE: Compilation error correctionposted in Bug Reports
Because... it's hard for me to explain
When I program some block, I'm writing its code in the browser and there are no warnings there. And I'm not looking to write perfect code (according to their rules), I just want the code to work. -
RE: Page keeps scroling down till you end the Internet Explorer tab with task managerposted in Bug Reports
Well, I don't recommend IE anyway. I program on Chrome, I know that Firefox and Opera are very close to it and normally work fine, but IE is not a big priority for me, because... because it is stupid anyway
And for Chrome there is a plugin to quickly download files, so I recommend Chrome. -
RE: Ocult Indicatorsposted in Questions & Answers
Well, there are MQL4 functions for that, but not in MQL5, and because of that I didn't added them in fxDreema. I think in the past we wrote with someone about this problem. I don't exactly remember how it was done, but I know it's possible... you only need to write some MQL4 functions in some "Custom MQL4 code" blocks.
