- Precision problem with OBJPROP_PRICE
- Errors in NormalizeDouble docs and functionality
- iCustom vales cannot be stored within a variable?
normprice=NormalizeDouble(ObjectGet(ObjectName(i),OBJPROP_PRICE1),4);
Okay. That has no effect. Same result as before which is there is no control over the precision. Please see the attached screen shot.

Print("Object #",i," name is ","\"",name1,"\" and price is ",normprice);commas instead of concatenation. feel the difference
there is another rule. rule of string concatenation, not print rule.
If You need to control strings then use conversion functions, in your case - DoubleToStr
If You need to control strings then use conversion functions, in your case - DoubleToStr
Got it. Yes, I just need to adjust precision for display as a string here so DoubleToStr is better. Thanks for the help.
stringo wrote:
Print("Object #",i," name is ","\"",name1,"\" and price is ",normprice);commas instead of concatenation. feel the difference
Actually, feel the docs on this one too.
Plus sign "+" is used in the code example for ObjectsTotal() as follows within Print():
Print(i,"Object name for object #",i," is " + name);
If the preferred and accurate method is to exclusively use commas, the docs should follow suit.
See function StringConcatenate https://docs.mql4.com/strings/StringConcatenate
Yes, I see that. Do you see my point about the doc example being inaccurate for ObjectsTotal? Its very difficult for newcomers to learn the right method to code when the docs provide wrong or non-preferred examples.

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