Questions from Beginners MQL5 MT5 MetaTrader 5 - page 624

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
Can you tell me why this might happen?
double A;
int x, y;
x=100; y=3; A=x/y=33,000
This is an interesting feature. You go and search in the search engine but you don't find anything. When you ask a question in the forum and wait for an answer, you find it by yourself ))
https://www.mql5.com/ru/articles/1561
Peculiarities of working with double numbers in MQL4
Please tell me, what can cause this?
double A;
int x, y;
x=100; y=3; A=x/y=33.000
as a rule, I guess:
Variables that are used in mathematical calculations, it is best to declare them as double
If these calculations use an incremental loop variable, we can use double y=y+1 or double y=y-1;
as a rule, I guess:
Variables that are used in mathematical calculations are best declared as double.
or double y=y+1 or double y=y-1;
There is also an explicit type conversion:
Hello.
Please tell me how to find a position with a certain lot among the open positions.
The symbol and the magic number are unknown. I need the following condition: if ( position's lot== 0.1) then {some action;}
Hello.
Can you please tell me how to find among the open positions a position with a certain lot.
The symbol and the magic number are unknown. I need about the following condition: if ( position's lot== 0.1) then {some action;}
Here is an example of a script that goes through all open positions and compares their volume to a given one (variable"lot"):
Here's an example of a script that goes through all open positions and compares their volume to a given one (variable"lot"):
Thank you, I'm sorry, I didn't specify, is there something similar for MQL4?
Thank you, I'm sorry, I didn't specify, is there something similar for MQL4?
No, no. And why, when there is MetaTrader 5 with netting and hedging and you can trade on real exchanges?
Here is an example of a script that goes through all open positions and compares their volume to a given one (variable"lot"):
Vladimir, can I ask how you envisage a position with a volume of 0.0 in this code?
Vladimir, can I ask how you envisage the 0.0 position in this code?