Errors, bugs, questions - page 2936
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Result:
What is the odd unsettled number? Not found or googled in Help. Doesn't look likeEMPTY_VALUE.
Some kind of rubbish.
Set value
Some rubbish
Set the value.
Not for practice, but purely out of theoretical curiosity. Another number (9xxx - I can't remember exactly) looked more like rubbish and appeared only once and couldn't reproduce it anymore, while the number above was constant and repeated from time to time. (I wonder if it is the same for you and others?) I don't care about it, the main thing is that other programmers don't stumble over it painfully.
It wasn't for practice, but purely out of theoretical curiosity. Another number (9xxx - I don't remember exactly) was more like rubbish and it appeared only once and could not be reproduced anymore, while the number above was constant and repeated from time to time. (I wonder if it's the same for you and others?) I don't care about it, the main thing is that other programmers don't stumble over it painfully.
I have "0", checked it several times
I got a 0, checked several times.
Hmm... I don't know how one circumstance relates to the other, but I ran it as an indicator on different currency pairs - numbers are climbing differently (on each instrument the same number is repeated with each tick ), there was even a zero. It is strange. But it looks like without initialising with its own number it really is rubbish.
Hmm... I don't know how one circumstance relates to the other, but I ran it as an indicator on different currency pairs - numbers are climbing differently (on each instrument the same number is repeated with each tick ), there was even a zero. It is strange. But it seems that without initialising with its own number it really is rubbish.
Re-checked it again by inserting the code by ticks
in mt4 it's always 0.
in mt5 yes, 0 is extremely rare, the number is 511026368
Hmm... I don't know how one circumstance relates to the other, but I ran it as an indicator on different currency pairs - numbers are climbing differently (on each instrument the same number is repeated with each tick), there was even a zero. It is strange. But it seems that without initialization with its own number it really is rubbish.
The array (and all the other variables) is allocated memory when creating it. If the array is not initialized, whatever is left there from past uses=trash.
If you don't change values from the program, nothing happens to this memory, rubbish keeps its value.
In MT4, all variables and arrays are forced to be initialized with zero.
CExpert.TradeEventOrderTriggered() not called
When working with FORTS market, BCS-Demo server, some instability of CExpert.TradeEventOrderTriggered() call has appeared when pending orders are triggered.
The code of the CExpert::CheckTradeState method of the MQL5 standard library doesn't take into account possible asynchronous reception of information about positions, orders, deals and history.
When the code is executed on historical data, the conditions work correctly. When working with real data, there might be situations where the information about changes of positions, deals, orders, and history is not obtained at the same time, and the order in which the information is obtained is random.
Log of calls of the bool CExpert::CheckTradeState(void) method. One call ofCheckTradeState() corresponds with 2 lines " CheckTradeState: .....".
You can see from the log:
1. When a pending order triggers, the history length is updated later than the information about deals, orders and positions, which leads to failure to meet the 1st condition in the code.
2. Possible unsynchronization of receiving information about changes in the number of orders, deals and positions, which leads to the impossibility to meet the 2nd condition in the code (if you can somehow bypass the first problem and perform the first if). Perhaps this desynchronization occurred when an order was executed in 2 steps (in parts: 1 lot+1 lot), but in that case why the number of deals +1, and not +2.
I got stuck with this code:
The point of the block: if in asynchronous mode we have got to the end of procedure, that is possible when history is not loaded, we fetch history, but we don't memorize values of orders quantities, etc.
P.S. It seems that this part of the standard library is underdeveloped. Especially disconcerting is a code fragment written 3 times in a row.
I am writing here hoping that the problem will be noticed and something will be corrected somewhere.
I have looked at the sizes of EX5 Expert Advisor files in the Market. All of them are smaller than 200 KB. What allows you to achieve such a small size? A simple code?
I think the authors are geniuses, 90% of top sellers have no questions about the platform at all - so they write the codes with a natural instinct ))))
here's the question:
I'm plugging in data:
I get an error:
resource file 'Common\Files\EURUSD_tick.bin' not found
cannot open resource file .....\\\\MQL5\Experts\Virtual\Common\Files\EURUSD_tick.bin' (3)
If I place the file in the folder EA or in the Files folder, everything is OK.
Is it possible that the resource cannot be mounted from the Common folder? -Or do I need to specify another path?
I think the authors are geniuses, 90% of the top sellers have no questions about the platform at all - so they write the codes with innate knowledge ))))
For questions other accounts.
You can not connect the resource from the folder Common? -or do you need another way to prescribe?
I do not know.