Errors, bugs, questions - page 2722
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
In principle, there should be no such a case - the issue should have been solved at the compiler level (as in C++). And in this case it's kind of possible and as a consequence, the discussion on several pages
Definitely a bug... But it must be! )))
imho, constant expressions must be known at compile time and static expressions must be known during initialization of the application in the description sequence.
and this scheme in MQL, where there's a kind of constant control, but I can assign constants myself at runtime, and I can use a function call as an initialization, like this
and this "constant" could be in the local visibility of.... at what point does it become a constant expression and how does it help.... i don't know, i don't understand it without manuals, there is no description of memory model - there is no point in it, well, at most, use as it should be - initialize with constant in all constructors, then the compiler will help warning if you accidentally decide to modify this field in the future
But this scheme in MQL, where there is kind of control over constants, but I can assign constants in random mode myself
How many times can you shame yourself with basic ignorance of the basics of C++?
this example is confusing at all:
2020.04.23 21:40:04.474 tst (EURUSD,H1) a = 1.07892
2020.04.23 21:40:04.546 tst (EURUSD,H1) a = 1.07893
2020.04.23 21:40:04.585 tst (EURUSD,H1) a = 1.07893
2020.04.23 21:40:05.254 tst (EURUSD,H1) a = 1.07893
2020.04.23 21:40:05.305 tst (EURUSD,H1) a = 1.07893
2020.04.23 21:40:05.306 tst (EURUSD,H1) a = 1.07892
There are two programs working on the same file at the same time. The one that writes uses the flags FILE_READ|FILE_WRITE|FILE_BIN|FILE_SHARE_READ. The one that reads - FILE_READ|FILE_BIN|FILE_SHARE_WRITE|FILE_SHARE_READ. Although the first program periodically saves the file with FileFlush, the second program only sees the length of the file when it is opened. Tried doing FileSeek back and forth - doesn't help.
Question: how do I make the program that reads the file pick up the data that is being rewritten?
This seems to be a bug, it was reported some time ago on the English forum. I didn't have time to report it here.
Don't the developers read the English forum?
There are two programs working on the same file at the same time. The one that writes uses theFILE_READ|FILE_WRITE|FILE_BIN|FILE_SHARE_READ flags. The one that reads - FILE_READ|FILE_BIN|FILE_SHARE_WRITE|FILE_SHARE_READ. Although the first program periodically saves the file with FileFlush, the second program only sees the length of the file when it is opened. Tried doing FileSeek back and forth - doesn't help.
Question: how do I make the program that reads the file pick up the data to be overwritten?
Are the two programmes in the same terminal or in two different ones?
Object methods from an object array passed by reference do not work.
Example:
Are these two programs in the same terminal or in two different ones?
In one terminal. Expert writes the data, the indicator reads the data. Hanging on different charts, but obviously could be on the same one (if that matters). Bild 2380.
VS2019
x = 12345
a.a = 12345
hmm, everything works like in MQL5
OK, I take it back, it won't compile in Sharp
Well, you've also got a constructor. It's up to you, of course, but structures are C entities, the model there is different - passive entities with external logic (functions).
Not necessarily. Why C? What about C#? - All talks about passive structures are archaic notions, imho. I believe that at least every type must have a constructor. Uninitialized fields are an evil, which must be avoided.
fxsaber
In your case, you need to make a factory method to create an array of structures, i.e. something like this:
And there already one of the previously suggested ways to fill array elements.
I have run into the following problem. The indicator draws candles
It is plotted on the chart. There is also an Expert Advisor that reads buffers of the indicator
So I logged and skimmed the stages and found out that the indicator often draws candles with a delay.
It means that several ticks ago (up to a couple of minutes exactly) it has already calculated and updated the buffers and the Expert Advisor is reading data from them
(both owls and the indicator write it in the log). But we see the old picture on the chart. For example, this screenshot is made at the moment when the red bar has broken through the low of the previous one. But on the chart we see only the previous red one and underdrawn green one (it is by fact bigger by two bars).
And here is the actual picture, it was drawn later. We see the breakdown, it initiated the capture of the screenshot. According to the logs everything is clear.
Who will tell me what is the matter and how to speed up chart refresh? I callChartRedraw function from the EA but it still has a couple of minutes delay.
Two minutes is a bit much, I can't even imagine the reason. Calculations are not so cosmic to slow down so much.