Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 125
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
about 25 people. For example: 14.02.2017 EURUSD 1.0630
Unfortunately, I don't see a solution to this problem purely with mql either.
Only create a letter template with the names of all the friends and mail
about 25 people. For example: 14.02.2017 EURUSD 1.0630
Hello.
I have killed all evening, but could not understand the reason, please help. The indicator should display data on the screen as a text mark, but when I start the terminal it does not happen, the mark appears only when I change the timeframe, then it works fine on ticks.
The example is simplified as much as possible, but the essence does not change:
int a=AccountInfoInteger(ACCOUNT_LEVERAGE);
intb=1000/a; // then print b on the screen
Using the method of elimination, I have concluded that this works only if I replace division with any other operation, or assign any constant to the variable "a".
I tried using ChartRedraw(), played with integer and double types, tried MathRound() and much more, nothing worked.
It's all strange.
Hello.
I have killed all evening, but could not understand the reason, please help. The indicator should display data on the screen as a text mark, but when I start the terminal it does not happen, the mark appears only when I change the timeframe, then it works fine on ticks.
The example is simplified as much as possible, but the essence does not change:
int a=AccountInfoInteger(ACCOUNT_LEVERAGE);
intb=1000/a; // then print b on the screen
Using the method of elimination, I have concluded that this works only if I replace division with any other operation, or assign any constant to the variable "a".
I tried using ChartRedraw(), played with integer and double types, tried MathRound() and much more, nothing worked.
It's all strange.
So, what's the problem with multiplication instead of division?
intb=a*0.001;
And it's also important where exactly in the code to do the calculations. I hope it's not in the inite or on a global level? You could also divide by zero ;)
Hello.
I have killed all evening, but could not understand the reason, please help. The indicator should display data on the screen as a text mark, but when I start the terminal it does not happen, the mark appears only when I change the timeframe, then it works fine on ticks.
The example is simplified as much as possible, but the essence does not change:
int a=AccountInfoInteger(ACCOUNT_LEVERAGE);
intb=1000/a; // then print b on the screen
Using the method of elimination, I have concluded that this works only if I replace division with any other operation, or assign any constant to the variable "a".
I tried using ChartRedraw(), played with integer and double types, tried MathRound() and much more, nothing worked.
It's all strange.
So what's the problem with redoing multiplication instead of division?
intb=a*0.001;
And it's also important exactly where in the code to do the calculations. I hope it's not in the inite or globally? You could also divide by zero ;)
Do the levels have to be transmitted exactly? Wouldn't it be better to create a signal and broadcast it?
And if you look in the log, you can find a critical error "division by 0" there
The logbook does indeed say: zero divide. I'm going to check it now.
I don't understand where does 0 come from? No data fromAccountInfoInteger(ACCOUNT_LEVERAGE) during initialization? And why doesn't the mark appear on next ticks?
I send them Whatsapp to the group as well. I just wanted to make life easier for them... to open the chart and my level is already there. Can you tell me more about the signal, is it by MT or a third party?
The logbook does indeed say: zero divide. I'm going to check it now.
I don't understand where does 0 come from? No data fromAccountInfoInteger(ACCOUNT_LEVERAGE) during initialization? And why doesn't the mark appear on next ticks?
Because the program has received a critical error and is not executing further.
Maybe, some brokerage companies do not pass the leverage? Although, I haven't seen it in forex...