michaelMNB:
This script creates a Horizontal line object that actually shows on the chart.
If I display the Objects List, the object name is included in the list.
However when I loop through ObjectsTotal() the object name does not Print.
In addition, ObjectFind() also fails to locate the object.
Any ideas to correct my coding problem ??
for(int i=ObjectsTotal(); i>0; i--)
should be
for(int i=ObjectsTotal()-1; i>=0; i--)
Please read the documentation. ObjectFind does not return a bool, it returns the window.
In future please post in the correct section
I will move your topic to the MQL4 and Metatrader 4 section.
KW-- The solution works Great.
Sorry about posting to the wrong section, I'll be more careful in the future.
Again, thanks for your help.
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
This script creates a Horizontal line object that actually shows on the chart.
If I display the Objects List, the object name is included in the list.
However when I loop through ObjectsTotal() the object name does not Print.
In addition, ObjectFind() also fails to locate the object.
Any ideas to correct my coding problem ??