Hold the mouse over one of these and orange "?" sign will appear on the left side. Click on it.
Posts made by fxDreema
-
RE: what i can use it ? and when ? options indicatorposted in Questions & Answers
-
RE: Risk 1% of balanceposted in Questions & Answers
Here are the methods explained: https://fxdreema.com/help/working-with/money-management
-
RE: How to delete the PREVIOUS pending order ?posted in Questions & Answers
But whyyyyyyyyyy?! This is literally in the initial page of the "Help" link - https://fxdreema.com/help - the project that appears in the middle of the page here tries to explain the order of blocks. Look at the block number there. This is written in the description: - block 1 will cause blocks 5, 2 and 4 to run, but in this order: 2 - 4 - 5.
-
RE: Variables and Constantsposted in Questions & Answers
It's a long story...
In the beginning Variables were just regular global variables and Constants were "extern" global variables. Then I started thinking "Hey, what if I remove the Constants and put a checkbox to turn any Variable into "extern" parameter?". And obviously I did that. But immediately I found a small problem...
In MQL5 you can define "extern" variable and then modify it in the code. But in MQL5. Try this MQL5 code:
input int inp = 0; void OnInit() { inp = 1; }It can't be compiled, it says "'inp' - constant cannot be modified"
If I use "extern" instead of "input", then there is no compile error, but also the variable is no longer an input parameters, it's like the keyword "extern" does nothing for MQL5.
Only in MQL4 and only if you use the keyword "extern" you can have input parameter that can then be modified into the code. But this behavior is for legacy reasons.So, having input parameters that can be also modified in the code was (and still is) forbidden in MQL5 and even in MQL4 (when you use "input"). That's why after I added those checkboxes for the Variables I almost immediately regretted.
What is the situation today? In the output code of the web version of fxDreema, both Constants and Variables are not global variables. They are members of two separate classes. This means that they all can be modified. But there are some problems again. I found that for people with many many Variables, the code is compiled very slowly. I guess that having classes with too many members is not good idea. So I'm now thinking to make Constants and Variables global variables again.
There are some technical difficulties as you can see and this determines my decisions

-
RE: Cannot load and/or export ex4 normally anymore (web version)posted in Questions & Answers
How often do you have problems with the website? People from China told me that their connection with the website is bad, but I have no idea how much. I personally live far away from the actual server and I have delay for each request about 120 ms, but even with that the website works fast enough for my taste (and I like speed). But maybe there is something else, I don't know...
There are few possible problems with .ex4/.ex5 files. The first problem is that the compiler (metaeditor.exe) starts very slow. This program can run as a normal Windows program as you know (MetaEditor) and also in command line mode. But with every new version the program starts slower and slower in command line mode. Unfortunately I can't fix that. But half of the waiting time is because of that.
The other half of the time you wait is for the file to be downloaded, because it is bigger that 1MB. Here I have some feeling that the speed should be faster, so I will investigate this.
There is another possible reason - the compile time could be slow. This is the time for which the MQL code is compiled. For your project this time is not very small, probably because of the size of the source code. But fortunately it compiles relatively fast. Because I noticed few times that with certain content in the MQL code, the compilation time becomes huge.
-
RE: According to the code, please upgrade desktop support Chinese language, thank youposted in Questions & Answers
I'm already tired of saying this, but there is no desktop version anymore! The program you are working on is something from the past that I no longer want to support.
-
RE: either buys or sellsposted in General Discussions
only visually renamed... because @miro1360 told me that he was confused by the old title, it was not clear what it means really - buy OR sell, or buy AND sell.
-
RE: Search for specific topics in fxdreemaposted in General Discussions
If you want to search in the forum, up there you can find that magnifying glass icon. But it is dark gray, not very visible. I guess I need to find how to make it white as the other icons.
-
RE: If l delete import dll mq4 code. It will have problem?posted in Questions & Answers
Delay block is the only one that requests DLL usage. This is the actual code:
#import "kernel32.dll" bool SleepEx(int ms, bool bAlertable); #importSo, MQL4 have native Sleep() function, which works in live, but has no effect when backtesting. But I wanted to have the ability to pause for a while when using the "Visual mode". This imported function SleepEx() allows me to pause the EA in Visual mode, and I really use this option on a regular basis. Most times I would just connect the "Delay" block after "Buy now" or "Sell now", so then the EA would wait for a while after the creation of each trade, which is very helpful when I want to analyse something.
This DLL usage is obviously harmless. And by default SleepEx() is not even used, because you need to select in the Delay block that you want to use Realtime delay for Visual mode. But the DLL is requested anyway.
-
RE: Trailing TP group of trades money amountposted in Questions & Answers
Checking the unrealized profit and then closing trades at certain profit - how is that connected to any stop-loss or take-profit?
If I am not wrong, you want to set the take-profit of all trades to be at the same level, so when that take-profit is hit, the total profit from all trades to be 10 usd. Interesting idea, but it doesn't exists as a block or option. And there is at least one possible problem for this idea. If your account is in USD and you trade EURUSD, 1 pip is always equals to certain amount of money, depending on the lot size. But if you are under USDCHF for example, that amount changes on every tick. So, if you want to be precise you will need to modify TP multiple times.
This is all very tricky and I think it's easier to just check the current profit and then close the trades that produced that profit. The downside of this is of course the fact that multiple trades would be closed slowly and the final profit will most probably be different than the value that is written in the block. But at least the broker does not see any TP levels, because TP is not used in this case
-
RE: Martingale on pending ordersposted in Questions & Answers
Yes, Martingale option works in a global way. It looks at the last trade to decide what will be the next lot size, but the type (buy or sell) doesn't matter. What matters is the Group number, so if you want to separate buys from sells, create them with different group numbers.
And by the way, even I don't know what is the right behavior when Martingale is used for pending orders. A true Martingale is when you create a trade, wait for it to close, then create new one, wait for it to close... and so on. But people decided that Martingale should happen in some way for currently running trades. So I added the ability to check currently running trades first (to get the lot size of the latest running trade instead of the latest closed trade). Then people decided that Martingale should happen in some way for pending orders, which is kinda ridiculous. So I added this MM for pending orders, but to be honest I forgot how Martingale works for them.
-
RE: Creating EA to buy when price crosses below Bollinger Bandposted in Questions & Answers
This way of connecting blocks (under "on Tick") should produce multiple buy trades, not just one. Why do you get only 1 trade?
You don't actually need that "Once per tick" block. Note that this block is a filter, not a driver. This block does not make the following blocks to run once per tick. Well, this is exactly what will happen if you have it under "on Tick", but for other reason. The way this block works is very similar to the way "OR" block works.
I don't know why don't get multiple trades, but block "No trade" is most probably needed at the top.
What do you want to happen? Because I don't really understand, something is missing for me...
-
RE: What is the difference between a script and an EA?posted in Questions & Answers
I like to imagine that Scripts are extensions to the interface of MetaTrader. Very similar to what a button in the menu would do - simple actions that happen when you click on them. For example the H1 button changes the timeframe of the chart to H1. Scripts do other kind of actions, but the idea is similar. The only thing that is missing (for me) is the ability to create custom buttons in the menu connected with certain Scripts. So you could have a script to close all trades for example, and you might want to put a custom button "Close All" up in the menu... but this is not possible.
-
RE: formula for SLposted in Questions & Answers
If you have both values in Variables, you can use the native MQL function MathMin() directly into the field where you would normally write the size of the SL - https://docs.mql4.com/math/mathmin
-
RE: Trailing Stopposted in Questions & Answers
Set the Trailing step to 5. Here is more info: https://fxdreema.com/help/working-with/trailing-stop
Now, the first step where you want to put SL to BE+1pip, this can be done with the Break even block. But then in the Trailing stop block you should set some "Trailing Start" to make it wait until there is some profit, and then to start moving SL.
Actually depends on what the initial SL needs to be. If it needs to be at 5 pips (at most), then I think you can forget about that +1pip and just use the Trailing stop only (with 5 pips step)
-
RE: Bunch of unwanted stuff that the EA drawsposted in Questions & Answers
Yes, this is hard coded, but it can be easily disabled in the output code... just remove the call for DrawSpreadInfo() and DrawStatus().
I was too lazy to add some option to be able to disable this. I guess I personally think that the spread meter is actually a very good thing to have

-
RE: Can i get trade statistics from an specific symbol with the built-in options?posted in Questions & Answers
Depends what this profitability means
-
RE: Indicator condition on multiple historic candles. Lookbackposted in Questions & Answers
Try that block "Indicator moves within limits".
The other way to look back is this - when you work with custom indicators (My Indicators in Condition block), there are few extra options in "More settings", and some of them have some kind of lookback behavior