Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1914
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
Please advise how to organise or which way to look:
Here, in order not to perform the calculation of bars, buffers were invented. With every new tick only the last bar is checked (as I understand it). When a new bar appears, calculation will start with this bar only.
Thanks to the buffer, the lines are not re-drawn on the whole history, but an additional segment is added to the last edge. There are 8 buffers in total.
What if I need to do a calculation a hundred times (let's say 100 times to draw a line, changing only one variable), and then draw the best result. And at a new tick or timer do the same thing, but with the existing "history" of results (drawings). Where and how do I store this information, so that I don't have to recalculate the entire history?
Or, more simply, how to increase the number of buffers in the indicator? Perhaps write them separately to a file? What is betterPlease advise how to organise or which way to look:
Here, in order not to perform the calculation of bars, buffers were invented. With every new tick only the last bar is checked (as I understand it). When a new bar appears, calculation will start with this bar only.
Thanks to the buffer, the lines are not re-drawn on the whole history, but an additional segment is added to the last edge. There are 8 buffers in total.
What if I need to do a calculation a hundred times (let's say 100 times to draw a line, changing only one variable), and then draw the best result. And at a new tick or timer do the same thing, but with the existing "history" of results (drawings). Where and how do I store this information, so that I don't have to perform these calculations over the entire history?
Or, to put it more simply, how do I increase the number of buffers in an indicator? Maybe write separately to a file? What is the best way toThe indicators have 512 buffers.
There are 512 buffers in the indicators.
Oh, wow. Thank you. I must have been looking in the wrong place. I'll keep trying.
ERROR FOUND BY MYSELF!!!
Here's a normally working code. May be useful for someone. Regards, Vladimir.
It won't be useful for anybody. There are gross errors in your code. And there is no sense in correcting them.
You don't even bother to learn the basics of the language and try to write something.
Either take it seriously or give it up.
No one can use it. There are gross errors in your code. And there is no point in correcting them.
You don't even bother to learn the basics of the language, and you're trying to write something.
Either get serious or give it up.
Any questions from newbies on MQL4 and MQL5, help and discussion on algorithms and codes
and wait for help here.
Regards, Vladimir.
Good morning! Yes, you are absolutely right. You need to quit this pointless business, which is to apply to the
Any questions from newbies on MQL4 and MQL5, help and discussion on algorithms and codes
and wait here for help.
Sincerely, Vladimir.
You're right, give it up.
You didn't even understand what I wrote in Russian.
Why do you want to get into programming?
No one can use it. There are gross errors in your code. And there is no point in correcting them.
You don't even bother to learn the basics of the language, and you're trying to write something.
Either take it seriously or give it up.
Please explain what his mistakes are. Briefly, in a nutshell, what you should pay attention to. And if the code works, what are its "bugs"?
Please explain what his mistakes are. Can you briefly summarise what to pay attention to? And, if the code works, what would be its "bugs"?
From the documentation... the inbox should have a ticket, not an index
If there are several orders for different symbols and the one we are looking for is the second in the list, we will not find it. Or there is only one magik, but we need to find it by another symbol, we will get an incorrect answer from the function...
from the documentation... the inbox should have a ticket, not an index
Thanks Alexey for the tip! Very bad influence on me from sitting at the computer at night. I thought I started with the order ticket yesterday and had already written a line in the code:
and then "moved off" it.
Alexey, may this variant of code be acceptable?
I have not touched Magic yet because the code is intended for a one-character EA.
Regards, Vladimir.
Thank you, Alexei, for the tip! Very bad influence on me from sitting in front of the computer at night. I thought I started with the order ticket yesterday and already wrote a line in the code:
and then "moved off" it.
Alexey, may this variant of code be acceptable?
I have not touched Magic yet because the code is intended for a one-character EA.
Sincerely, Vladimir.
This approach is not acceptable for me. Add a check for Magik and a symbol, two lines of code and you will get a normal approach to solving a task in return. And if you ignore my principles, the code is not quite right.
This is more logical.
And in this code, all you have to do is replace the blank check
to check for a magician and a character
and it's already a more universal function...