//+------------------------------------------------------------------+ //| Set comment of object. | //+------------------------------------------------------------------+ bool CChartObject::Description(const string new_text) const { //--- checking if(m_chart_id==-1) return(false); //--- tuning if(new_text=="") return(ObjectSetString(m_chart_id,m_name,OBJPROP_TEXT," ")); <<--- if text="" then set text=" " //--- result return(ObjectSetString(m_chart_id,m_name,OBJPROP_TEXT,new_text)); }
avoitenko:
Hello avoitenko,
thank you. This explains it. Don't know how to access source code.
By the way: const string new_text makes no sense as new_text is a local copy.
const string& new_text would be better
Don't know how to access source code.
Right click and select Go To Definition.
oh well, thank you.
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,
there is a problem with CChartObjectLabel::Description function.
Please look at the sample below. It should print 0 to console as Description is empty.
Unfortunately, it returns 1. What is the reason ?
thank you