Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 908
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Hello!
Can I set the length of the Fibonacci extension lines in OBJ_EXPANSION? What does it depend on?
Regards, Alexander
Hi all! guys, can you tell me if it's possible to modify an open position BY CHANGING ONLY THE COMMENT OF THIS POSITION? When I partially close a position, I get it done, but changing just the comment does not work. For example, a situation has occurred in the market and I want to add some information to the comment of the open position
the order comment cannot be changed in any way - from the word impossible....a the broker's server changes the comment, who at the transition through 0:00 h, almost everywhere at partial closing of the order, often at full closing of the order in the history of orders the comment of the order will be changed
You cannot change the order comment even when the order is partially closed - the order comment is available only once - only when the order is sent to the server (order opening)
like this ;)
the order comment cannot be changed in any way - from the word impossible....a the broker's server changes the comment, who at the transition through 0:00 h, almost everywhere at partial closing of the order, often at full closing of the order in the history of orders the comment of the order will be changed
You cannot change the comment on the order when it is partially closed either - the order comment is available only once - only when the order is sent to the server (order opening)
like this ;)
First you open a position with the comment "hello" and then you close it partially with the comment "hello again".
Your comment?
the order comment cannot be changed in any way - from the word impossible....a the broker's server changes the comment, who at the transition through 0:00 h, almost everywhere at partial closing of the order, often at full closing of the order in the history of orders the order comment will be changed
You cannot change the comment on the order when it is partially closed either - the order comment is available only once - only when the order is sent to the server (order opening)
like this ;)
Or we just open a position manually on the chart with one comment and then manually close the position partially with another comment. I would like to change only comments
First a position is created with the comment "hello" and then it closes partially with the comment "hello again".
Your comment?
99% of the questions in this thread are for MT4 platform, you have not specified a platform, so I have answered based on MT4 capabilities.
Unfortunately I don't use SBTrade.mqh, I can't say anything, for me I only write for MT5 using MT4Orders.mqhhttps://www.mql5.com/ru/code/16006
First a position is created with the comment "hello" and then it closes partially with the comment "hello again".
Your comments?
This example has been available for a long time. The CTrade class now has its own methodPositionClosePartial
Why can a functionhttps://www.mql5.com/ru/docs/array/arraymaximum have a declaration in its parameters
void& array[]
but I'm not allowed to declare it in parameters of my function?
What should I do if I want to write my own ArrayMaximum(), because MT4 and MT5 have parameters mixed up (or specially)?
Why can a functionhttps://www.mql5.com/ru/docs/array/arraymaximum have a declaration in its parameters
but I'm not allowed to declare it in parameters of my function?
What should I do if I want to write my own ArrayMaximum() ?