@mayfair22 I fixed the problem
Posts made by fxDreema
-
RE: Securityposted in Questions & Answers
@forexbob-0 Under the hood this function is used:
AccountInfoString(ACCOUNT_NAME);There is no special information about ACCOUNT_NAME in the documentation, it only says "Client name".
-
RE: Debugging / Backtesting an EAposted in Questions & Answers
I mostly use "Draw Arrow", "Draw Line", "Comment", "Delay" or "Terminate" blocks.
The first 3 are similar, they output something graphical, or print some text.
The "Delay" block doesn't output anything graphical, but because it pauses the EA for few seconds, I have enough time to actually pause the Tester and investigate something at the time it happens.
I use the "Terminate" block to just stop the EA when the EA does enough of what I want. Maybe I want just 2 trades or whatever. This block allows me to run the EA on the fastest speed, stop it when I have enough info, and if I run in multiple times, It would be stopped at the same time.
-
RE: Would it be a bug??? Sum in Loop for 2 or more orders not working!posted in Questions & Answers
Now that's an example that contains a good amount of blocks and is easily testable, I like it

The problem is that you are not incrementing the variables.
Let's get
twobuysfor example. Block 9 would run block 8 twice for the two last positions, first the last position and then the previous.- On the first run
twobuysis set to the profit of the last position, which is -4.06. The value oftwobuyswas 0 and became -4.06. - On the second run
twobuysis set to the profit of the previous position, which is -4.00. The value was -4.06 and became -4.00.
If you want to sum both values, you should add the value of
twobuysto itself on every run. But also, you must reset the variable every time before such incrementations, otherwise the value will grow and grow without limits.
Instead of the side Variables panel, you can also use "Modify Variables" before blocks 9 and 11 to set the variables to 0.
- On the first run
-
RE: Forum updateposted in Questions & Answers
At the moment someone is attacking the website, trying to login with random credentials and from different IP addresses
-
RE: Ex4 files can't be importedposted in Bug Reports
.ex4 files contain binary data, generated by the compiler (metaeditor). But more importantly, these files are supposed to be encrypted and not leak information about the source code of the program.
-
RE: All Blocks Resized + Lost All Connectionsposted in Bug Reports
Meanwhile an hour ago I updated all database queries. My hope and expectation now is that the website will be a little bit more stable when the 1000s of projects and 1000s of blocks come tomorrow.
-
RE: All Blocks Resized + Lost All Connectionsposted in Bug Reports
@roar Let's say that the middle number on the right side is there only to scare people. The real number at the moment is 8000

@Jim67 I used the word "abusing", because with it I think it's easier to understand. But note that the word is in quotes, so I don't mean it literally.
I tried to explain this few times and I will say it again - the database is slow, because my code and the database indexes that I created are not very well optimized. This is because I don't have a good knowledge of databases. Not to mention that the deletion of old projects is just annoying, so no wonder why these guys have 1000s of projects. But that "abuse" is actually helping in a way, because it shows me where I need to fix the performance. While I'm doing that I'm also learning more about the database, which will be useful in future.
By the way, in the very beginning when I launched the website, projects were already too heavy with just 50 blocks.
If the code and the database indexes are well optimized, the server can handle those 1000s of projects and 1000s of blocks. Well, if the number of users grows, at some point other kind of optimizations will be required and I will have to learn more about databases, but we are not there yet.
-
RE: All Blocks Resized + Lost All Connectionsposted in Bug Reports
@Jim67, almost nothing will change if you delete your ~100 projects.
The problem I'm investigating now happens (I believe) when somebody with 1000s of projects is creating a new project. Although the exact way the problem happens doesn't really matter. Normal accounts are like yours - not 1000s of projects, not 1000s of blocks in their projects. But there are these students of the guy that I mentioned before that have the 1000s of projects and some of them have projects with 1000s of blocks. When they are active during the day, they are "benchmarking" the website. Because of the way these guys are using the website, those slow database queries are showing up.
But the slow database queries are slow, because they are not properly optimized. In databases there is something called "index", which is when part of the database is cached in the RAM and is used for quick searches. Well, what I'm discovering these days is that some of the queries I wrote are not using the indexes effectively. If everything is well optimized, those 1000s of blocks should be no problem at all and the queries should happen in just a few milliseconds. Because they are not optimized now, they happen in few seconds.
But again, these are just a few queries that just a few accounts are "abusing". Why everyone experiences slow moments is that while the database is processing these slow queries, the other queries are waiting.
-
RE: All Blocks Resized + Lost All Connectionsposted in Bug Reports
I found yet another slow query. Well, this one is not always slow, it becomes slow when the user has 1000s of projects, because there is sorting involved, which takes few seconds. And all of this is to get just the id of the last modified project. But it's possible to make this query very fast, I'm now trying to see exactly how. At this point it should be obvious that I'm not very good with databases

-
RE: All Blocks Resized + Lost All Connectionsposted in Bug Reports
@Jim67, I'm not that surprized of the fact that sometimes projects are breaking, because this is not something new, it always happened. I must agree that the process of saving the project's current state it not very well polished. Basically, when you do some action (new block, blocks move, connection), everything in the browser (blocks, connections, areas) is read and sent to the server for saving. Ideally, what you see in the browser matches the records on the server. The problem is that if there is some mismatch, the project could break. And such mismatches could happen when there are problems with the communication between the browser and the server. I'm in a process of rewriting the whole website and eventually I will add different guardrails to prevent projects from breaking, but at this time projects are sometimes fragile.
My concern is when there are problems with the communication with the server. I'm still noticing slow moments from time to time. Not as bad as it was days ago, but still noticeable.
Otherwise I can suggest to reload the project more often. Personally I never experienced that moment when a project breaks, maybe because every time when something doesn't look right to me, I realod the whole page. But I probably do this because I know how a project could break.
-
RE: All Blocks Resized + Lost All Connectionsposted in Bug Reports
@Jim67 said in All Blocks Resized + Lost All Connections:
I had noticed it was slower than usual but thought it just my connection.
It's interesting that it all started suddenly. My first thought was that someone is attacking the website again. And by the way, the other day I banned one IP that was trying to open different non-existing paths, but he was not the problem.
There is a guy who has multiple accounts, paid accounts, and some of these accounts contain many projects, and some of them are big projects. At least 14 of his accounts were active in the last few days. I saw one account with more than 4k projects, another with more than 7k projects, and the active projects that I noticed contained more than 2k blocks. Also, because I'm monitoring the logins, I knew that there are lots of logins to his profiles through the day - all of his accounts have similar emails, it's very easy to spot them. It's like half of all logins are to his accounts, and maybe all logins are by email. First I focused on the number and the size of the projects, but at the end it was the logins by email that contributed to the problem. This guy is doing some kind of business and it looks that he got more clients or more work lately.
-
RE: Is Fxdreema being updated or something similar or BUG?posted in Bug Reports
https://fxdreema.com/forum/topic/16633/all-blocks-resized-lost-all-connections?_=1682276113577
I fixed the problem that caused the website to be slow. It was a very slow database query that I wrote few months ago.
The other problem with the missing block titles the connections... I still don't know why it happened. I know where in the code it happens, I just can't explain how this part of the code is reached for newly created projects. It's some code where the structure of old projects (created years ago) is being updated to newer structure. For some reason some newly created projects ended up being "updated" and their structure was changed. I'm still not finished with this problem, I have to make some additional investigations.
-
RE: All Blocks Resized + Lost All Connectionsposted in Bug Reports
I fixed this slow query, now I expect everything to be smooth. The CPU already looks low and beautiful.
-
RE: All Blocks Resized + Lost All Connectionsposted in Bug Reports
I think I found the problem. There is a very slow database query that I wrote after I updated the forum. This query searches for existing user by email. This query is used every time when someone registers a new profile, or when someone is logging in with email.
The good news is that maybe huge projects are not so big of a problem

-
RE: All Blocks Resized + Lost All Connectionsposted in Bug Reports
I think I fixed this problem, although I could not understand why it happened.
I'm still trying to find why the whole website is being so slow. I was thinking that big projects are to blame, but I was watching how the EA builder is working from different angles and I can't confirm that this is the problem.
Now I will focus on the forum. Look at the traffic these days:

There is some obvious increase of traffic since these problems happened, although it doesn't seem too bad. But I will try what will happen if I disable the Search functionality or the whole forum for a while. -
RE: Is Fxdreema being updated or something similar or BUG?posted in Bug Reports
I think these problems are now happening because of the delays these days. I'm investigating the problem and I think it's because of users with giant projects. I noticed someone with almost 7k blocks, which is too big for this website. There are also users with 2k+ blocks, but most have smaller projects. I will have to put some limits on the creation of new blocks.
By the way, this problem with the missing titles is something new that I'm seeing. Usually the blocks remain visible, but they are totally broken. With this problem, only the titles are missing, but the blocks are good.
In any case, it's not a good idea to work on the same project from 2 places, 2 browsers, even 2 tabs in the same browser. But even if working from 1 place, now with these problems I think it's possible for the project to break.
If a project is broken, go back in the History one or more steps back.
-
RE: are experiencing the same?posted in Questions & Answers
I think the server was out of RAM or something. On the server I'm running Chrome for some scripts, and after some days of working it tends to eat the memory. I closed them (plus some other old processes) and I think it works better now.
Maybe there is also someone working on a big project, because I notice some spikes that could be related to this.
-
RE: Is this a resolution to the error code=4806?posted in Bug Reports
I'm also not sure about the performance implications of using many indicators in MQL5, I never tested so much indicators at once. But in programming, when we want to read something over and over again, and the reading itself tends to be slow, we cache it and read the cache instead. Also, there is one basic rule in programming called DRY (Don't Repeat Yourself) - the idea is to write some functionality once in some function, and run that function over and over again, instead of writing the same code at many places.
I see your project (the current one at the moment of writing this), which is a large project, and it's large because you have copied the same groups of blocks multiple times. This makes you a newbie in programming
Well, to be fair, sometimes it's not very easy or intuitive to make things the good way in fxDreema. Sometimes it's not even possible.But here are my suggestions.
- If you are using the same indicator with all the same settings in multiple blocks, make a "double" variable. Then, in "on Tick" before all other blocks set the value of that variable to be the indicator's value. For this use "Modify Variables" block with low block number, so it runs before the other blocks. And then in the blocks where the indicator is used, use the variable instead.
- Re-use the same group of blocks... if you know how. Unfortunately, this is tricky. If you know how a function works in any programming language, it's the same idea. You would have 1 block at the top of the group of blocks, which would be the block you run. The alternative for function arguments would be multiple variables. It's also possible to use arrays by the way.
- If possible, limit the execution of some groups of blocks. This depends, but let's say you have a group of blocks that runs on every tick without a problem, but it will be the same if it runs for example once per block, it will not change the behavior. In such case, put some "Once per bar" block. This will boost the performance.