Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 733

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'll give you that. But it takes a lot of effort to figure out that this is the "Trading" window and not the "Account History" window. Inattentiveness and laziness, without straining my head muscles, led me to believe it was the Account History window.
It happens. Forgivable.
Disabled the standard bid line on the chart because of the inconvenience of reading five digits, made the output 4 digits in the upper corner, but sometimes the price goes down, which again causes inconvenience :-)
I want to make the Label object move with the price, right price tagOBJ_ARROW_RIGHT_PRICE I don't like because of the frame.
But for some reason the positioning by price bid doesn't work, the label is displayed in the upper left corner
Disabled the standard bid line on the chart because of the inconvenience of reading five digits, made the output 4 digits in the upper corner, but sometimes the price goes down, which again causes inconvenience :-)
I want to make the Label object move with the price, right price tagOBJ_ARROW_RIGHT_PRICE I don't like because of the frame.
But for some reason the positioning by price bid doesn't work, the label is displayed in the upper left corner
ForOBJ_LABEL the position report is specified in pixels.
I decided to write a simple code to calculate the tendency of losing an account. For this purpose I took a simple Z-account formula and tried to transfer it to mq4 code.
Everything seems to be correct, but when I run simple output using Print the EA does not work at once. I don't get any errors when compiling.
I've already racked my brains on simple code.
Thank you if you can help !
I decided to write a simple code for calculating the tendency of losing an account. For this purpose I took a simple formula of Z-account and tried to use it in mq4 code.
Everything seems to be correct, but when I run simple output using Print the EA does not work at once. I don't get any errors when compiling.
I've already racked my brains on simple code.
Thanks if you can help !
Check the work permit for the EA. And where in the print output? This piece of code must return something, if there are no errors, then the problem is outside of this piece of code. Except that division by 0 may occur in this block.
ForOBJ_LABEL the position report is specified in pixels.
Ilya, thank you, it worked.
Only when going to the next stage - accounting for window resizing - the compiler gives a warning about data type conversion:
possible loss of data due to type conversion 4digit+.mq5 36 14
Although the function returns int type.
Ilya, thank you, it worked.
Only when going to the next stage - accounting for window resizing - the compiler gives a warning about data type conversion:
possible loss of data due to type conversion 4digit+.mq5 36 14
Although the function returns the int type.
Really?! And where does it show that the order has closed?
A green TP in the "trade" window means that the current price is within -100 pips of the TP, or, to be more correct, within 100 pips of the TP.
The function returns long type
What should I do in such cases, change the type of the variable or leave it as it is?
What is recommended to do in such cases, change the type of variable or leave it as it is?