Download MetaTrader 5

Possible mql5 bug - string

To add comments, please log in or register
Do you have a trading signal? Publish it in your blog as well!
mqltools 2010.02.09 04:30 

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);

The displayed result is: "Comment: 1".

The following code, however, does work: 


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. 

Rashid Umarov
Rashid Umarov 2010.02.09 12:53  
What do you mean? There is just our code without your modifications here, we have checked and it works properly. Please, provide mode detailed information.

mqltools 2010.02.09 13:46  

I'm sorry! I didn't notice that the new metatrader writes everything in user's local folder. I just uploaded code from /Scripts from Program Files Metatrader's folder.

I'm attaching the correct version. 

(it's in the InfoToChart function) 

To add comments, please log in or register