
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 modifying PositionInfoSample.mq5, and I added comment display capability.
The following code DOESN'T work:
const string a = m_position.InfoString(POSITION_COMMENT);
m_label_info[14].Description(a);
The displayed result is: "Comment: 1".
The following code, however, does work:
m_label_info[14].Description(m_position.InfoString(POSITION_COMMENT));
The position's comment is displayed correctly (as string).
What's the reason for this? If this behavior is correct, then, how to display a comment using variable indirection?
I'm attaching the whole PositionInfoSample.mq5 with my (albeit very small) modifications.