Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1242
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
I'm reading it. Just haven't gotten there yet, I guess. I don't think it's easy to get through a 28 MB pdf reference. Or to put it another way - not all parishioners know the whole Bible, even though they are devout believers.
I have another question, please advise - if it's not difficult:
when executing code in the strategy visualiser:
1. the program goes into an infinite loop;
2. the results of execution are different:
without breakpoints:
With breakpoint on Print:
All done on debugging historical data.
You are constantly increasing the variable. What do you think: when will the size of the variable go beyond its limits?
You are constantly increasing the size of the variable. What do you think: when will the size of the variable go beyond its limits?
I think that 10 iterations of the ulong should have been enough. The question then is:
1. why doesn't the loop break? and
2. why aren't the results of the iteration time counter itself displayed?
Is it because debugging was done on historical data?
I think that for 10 iterations the ulong should have been enough. The question then is:
1. why doesn't the loop break? and
2. why aren't the results of the iteration time counter itself displayed?
Is it because of debugging on historical data?
You have a variable declared at global program level - you are constantly increasing it.
You have a variable declared at the global program level - you are constantly increasing it.
I still don't understand what the global variable has to do with it. The program itself is limited to a loop: "for(int i=1; i<=10; i++)" ?
Or maybe I don't understand something, please explain.
I still don't understand what the global variable has to do with it. The program itself is limited to a loop: "for(int i=1; i<=10; i++)" ?
Or maybe I don't understand something, please explain.
Remove variables
out of global scope.
On each tick, you repeatedly increment the raschet variable. And on the next tick, you CONTINUE to increment it several times. A few ticks and theraschet variableis out of range. Eventually you print out the variable's values, but don't look at the printout for some reason.
Remove the variables
from the global scope.
On each tick, you increment the raschet variable repeatedly. And on the next tick, you CONTINUE to increment it repeatedly. A few ticks and theraschet variableis out of range. Finally you print out the variable's values, but don't look at the printout for some reason.
Thanks, I get it. I just got confused, thinking that return stops the program at all, whereas it just interrupts its execution on the current tick. Instead of "return;" I put"ExpertRemove();".
Can you tell me in this code:
How can I get constantly updated price values of Envelopes lines in variables upEnv and lowEnv? It draws the indicator, but the indicator values in the variables are updated 2 times and that's it.
Can you please tell me in this code:
How can I get constantly updated price values of Envelopes lines in variables upEnv and lowEnv? It draws the indicator, but the indicator values in the variables are updated 2 times and that's it.
First of all, decide: do you want to write an Expert Advisor or an indicator? (You have a mixed code now - indicator and Expert Advisor are mixed together) - i.e. the code will not work.
Hint: Use MQL Wizard to create a template.
First make up your mind: do you want to write an EA or an indicator? (Right now your code is a mess - both indicator and Expert Advisor are mixed together) - that is, the code is unworkable.
Hint: Use MQL Wizard to create a template.
I already tried it. But it generates classes in Wizard. I'd like to at least understand the code in a simple way - the code I understand at least a little. Could you please advise how to correct the code in order to get indicator values in the EA?