Tickstory?
Best posts made by fxDreema
-
RE: How the generated MQL4/MQL5 code is structuredposted in Questions & Answers
First of all, check MQL4 (MQL5) specifications about special functions:
http://docs.mql4.com/basis/functions/special
http://www.mql5.com/en/docs/runtime/runningLet's take MQL4 for example. There are 3 basic special functions: Init(), Start() and DeInit(). The basic structure of MQL4 expert advisor looks like this:
//+------------------------------------------------------------------+ //| MQL4file.mq4 | //| Copyright © 2011, MetaQuotes Software Corp. | //| "http://www.metaquotes.net" | //+------------------------------------------------------------------+ #property copyright "Copyright © 2011, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" //+------------------------------------------------------------------+ //| expert initialization function | //+------------------------------------------------------------------+ int init() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| expert deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| expert start function | //+------------------------------------------------------------------+ int start() { //---- //---- return(0); } //+------------------------------------------------------------------+As you can see the three special functions are placed one after another.
Init() is called only once when expert advisor starts, Start() is called at each tick, and DeInit is called only once when you shut down the expert advisor.In FXDreema each library (block) is represented in output code with it's own function.
- Not connected blocks will not appear in output code
- First blocks in logic trees will be called first
- Logic trees can be as many as you want
- Logic trees may be as bigger as you need
- One independend logic tree may have more than one first blocks
Let's see some examples. First we'll see what happens with only one logic tree.
http://i41.tinypic.com/1z4fi50.png
This will output something like this///////////////////////////////////////////////////////////////////////////// //+-----------------------------------------------------------------------+// //| EXPERT INITIALIZATION SECTOR |// //| Runs only once when expert loads |// //+-----------------------------------------------------------------------+// ///////////////////////////////////////////////////////////////////////////// int init() { return(0); } ///////////////////////////////////////////////////////////////////////////// //+-----------------------------------------------------------------------+// //| EXPERT START SECTOR |// //| Runs at every new tick (begins with "start()" function) |// //+-----------------------------------------------------------------------+// ///////////////////////////////////////////////////////////////////////////// int start() { start1(); // The only first block in the only logic tree return(0); } ////////////////////////////////// // Define block 1 (Empty block) // void start1() { start2(); start4(); } ////////////////////////////////// // Define block 2 (Empty block) // void start2() { start3(); } ////////////////////////////////// // Define block 3 (Empty block) // void start3() { /* Nothing here */ } ////////////////////////////////// // Define block 4 (Empty block) // void start4() { /* Nothing here */ } ///////////////////////////////////////////////////////////////////////////// //+-----------------------------------------------------------------------+// //| EXPERT DEINITIALIZATION SECTOR |// //| Runs only once when expert unloads |// //+-----------------------------------------------------------------------+// ///////////////////////////////////////////////////////////////////////////// int deinit() { return(0); }The logic is:
At each tick block 1 is runned
If block 1 passes -> Run block 2 and block 4
If block 2 passes -> Run block 3Ok, there's two logic trees:
http://i41.tinypic.com/zunnl4.png
And the output code is:///////////////////////////////////////////////////////////////////////////// //+-----------------------------------------------------------------------+// //| EXPERT INITIALIZATION SECTOR |// //| Runs only once when expert loads |// //+-----------------------------------------------------------------------+// ///////////////////////////////////////////////////////////////////////////// int init() { return(0); } ///////////////////////////////////////////////////////////////////////////// //+-----------------------------------------------------------------------+// //| EXPERT START SECTOR |// //| Runs at every new tick (begins with "start()" function) |// //+-----------------------------------------------------------------------+// ///////////////////////////////////////////////////////////////////////////// int start() { start1(); start5(); // The first blocks in logic trees called one after another return(0); } ////////////////////////////////// // Define block 1 (Empty block) // void start1() { start2(); start4(); } ////////////////////////////////// // Define block 2 (Empty block) // void start2() { start3(); } ////////////////////////////////// // Define block 3 (Empty block) // void start3() { /* Nothing here */ } ////////////////////////////////// // Define block 4 (Empty block) // void start4() { /* Nothing here */ } ////////////////////////////////// // Define block 5 (Empty block) // void start5() { start6(); start7(); } ////////////////////////////////// // Define block 6 (Empty block) // void start6() { /* Nothing here */ } ////////////////////////////////// // Define block 7 (Empty block) // void start7() { start8(); } ////////////////////////////////// // Define block 8 (Empty block) // void start8() { /* Nothing here */ } ///////////////////////////////////////////////////////////////////////////// //+-----------------------------------------------------------------------+// //| EXPERT DEINITIALIZATION SECTOR |// //| Runs only once when expert unloads |// //+-----------------------------------------------------------------------+// ///////////////////////////////////////////////////////////////////////////// int deinit() { return(0); }The logic is:
At each tick block 1 is runned
If block 1 passes -> Run block 2 and block 4
If block 2 passes -> Run block 3At each tick block 5 is runned
If block 5 passes -> Run block 6 and block 7
If block 7 passes -> Run block 8In Init() and DeInit() rules are the same. Only names for functions starts with "init" and deinit".
ID's of blocks are unique in global scope. So you can have only one block with ID #3 for example, no matter if it is in Init(), Start() or DeInit().
-
RE: Trailing stop bugposted in Bug Reports
Well, the decision of the block to move SL depends on few parameters - current price, current SL, trailing Stop, trailing Step and also Start. Few days ago I posted this page in the Help section: https://fxdreema.com/help/working-with/trailing-stop
I think that what it does is expected, because the initial SL is far away from Open Price. But you can delay that with Trailing Start.
-
RE: Desktop version of FxDreema?posted in Questions & Answers
Drew, it all depends on the server logic. For other sequrity reasons I was thinking about to save a copy of the project files before they are deleted in something like Recycle Bin. This makes sence when a user deletes a project accidentally.
But currently FxDreema works the way you like it - all the files are deleted and no backup files left. -
RE: Bug in blocksposted in Bug Reports
@tcanuto, I am doing something every day
I'm always careful not to break something, but the whole thing is very complex and sometimes problems happen.As usual I hardly understand what you are writing. What is the problem now, is it something in "Close Positions"?
I told you this probably million times. But if you want to show me something, better show me some simple project that contains 2-3 blocks at most, so I can clearly see the problem. I'm lost in these big people's projects. You know your project, but I don't. I need time to first understand how the project works... and I am too lazy to do that unfortunately.
-
RE: MT4>>MT5posted in General Discussions
If I ever understand how to work with it

I just noticed this:
https://www.mql5.com/en/forum/53/page17#comment_2431783

Is this really working? -
RE: Copy and Paste EA Code Building Blocksposted in Questions & Answers
This is something that exists. Well, I have to describe it into the documentation
You know that right click on block opens it's parameters window... try to right click when a block or group of blocks are selected (yellow glowing). -
RE: template parameter ambiguous, could be 'ulong' or 'int'posted in Bug Reports
Don't worry, I'm giving you 1 month bonus right now

I think I fixed this error
-
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: Excellent work by fx dreemaposted in Questions & Answers
It is unknown because I'm rarely advertising it. One of the reasons for this is that I think I will not be able to support many users at once. But surprisingly enough for me, there are 1-5 people registering every day "by chance" and I feel good with that.
-
RE: forum bugposted in Bug Reports
I guess something is wrong, but this Shoutbox is a plugin for the forum and to be honest I'm a little bit scared to touch those things in this forum. I was having hard time to configure all the relative links properly in the beginning

-
RE: Multi strategy EA?posted in General Discussions
Take a look at that "Group" parameters in each trading block, such as No trade, Buy now, Trailing stop, and so on
https://fxdreema.com/help/working-with/magic-start-and-groups
-
RE: Super Trend Indicator EAposted in Questions & Answers
Indicators communicate with EA's via buffers, and buffers are simply holders of values. No more than 8 buffers for an indicator are allowed. Those buffers can represents OR NOT the objects drawn by indicator (lines, arrows, histograms and others)
Normally, if the indicator is written with all the best rules, each object of the indicator will be represented with it's own buffer. If there is a line that shows value 55 on the screen, then there will be buffer named like "LineBuffer" with the same value of 55. As we already know, EA's can read buffers, they does not search for objects actually.
An indicator can show line, histogram, arrow or other objects. While the line is normally continuous with each value very close to the others, arrows are not the same nature. Arrows are either exists or not exists. So, in case there is a buffer that represents arrow, while the arrow is visible, the buffers holds value of the level where the arrow is positioned - price value like 1.2683. But, when we have no arrow on chart, what is the vaule inside the buffer?
Buffers that represents signals drawn by arrows normally holds a value like the price level where the arrow is located. And there are many possible variants when there is no signal/no arrow. In such case the buffer can be 0, 2147483647 or negative value like -1. Why is that? It depends on how the indicator is written, it depends on the developer's work. But in order to work with that indicator, you MUST know what happens in it's buffers.
As I said before, buffers can represent objects, or can return values that are no "visible". And it's not that rare situation where you can find an indicator with broken buffers, where you will not find any logical meaning in what the buffers says. This can happen if the indicator is written by someone, then updated from another one who is not as good programmer as he believes he is.
%(#FF8000)[Now, to make things a lot easier I just made a new block named "Levels tester (for indicators and more)". Use it to check custom indicator's buffers when you are not sure what values they hold. You will be able to see values as a line and actual numbers. Use this in "Visual mode" of course.]
-
RE: Error fxdreema.com/studioposted in Bug Reports
Oh, I think I know why this happens and I will go to fix it now. It may take a while.
For projects with only few blocks it might generate bigger files than before, but for bigger projects it makes them smaller. But it was not only because of the size, MetaTrader does not complain when an EA is megabytes. In general, it's better when a code is written in OOP style and I wanted to do that for a long time. Although, now that I did that, I can't say that I really like this style, it's probably even harder for somone to understand what is going on in the code.
-
RE: Does your fxDreeema work properly for both Live and Demo accounts?posted in General Discussions
By "Demo" you also mean live, not backtesting? Do you have error messages?
-
RE: Managing Risk, Multiple EAs on One Accountposted in General Discussions
Well, managing risk is too general, you better explain what you mean

Each EA creates some trades on the same account, so each EA uses the same source of money. But EAs are separated by something called Magic Number. Basically when an EA creates a new trade, it gives particular Magic Number to that trade... and all trades that it creates. Then when it want to let's say delete a trade, it will only see those trades with it's own Magic Number and should not touch the others.
-
RE: MM Fixed Ratio Position Sizing created by Ryan Jonesposted in Questions & Answers
To be honest, I'm a little bit skeptic... it looks to me like just another fancy stuff around that can be described as "doing same thing in another way because it's cool to be different"

You want to try this formula because you really get it or because you saw the chart on the bottom of the page?
