brad:
hi there,
thanks for your assistance. I'm trying to write some code that will print out my horizontal lines but the script is loaded and then removed. Does the mrket have to be open to run or why doent it work?
anks, brad.
There is no problem with this script.
Do you have some horizontal lines on your chart ?
brad: Does the mrket have to be open to run or why doent it work?
No ticks on the weekend when market is closed.
Scripts shouldn't. I didn't read close enough.
Try looking in the Experts tab for your printout, as previously answered. | GumRai: Are you checking the Expert tab/logs
|
This finds that there are 2 HLINEs on the chart of nnn objects, and then prints out the names of the first two objects, not the names of the HLINEs. | TotalHLines=ObjectsTotal(OBJ_HLINE); for(int i=0;i<TotalHLines;i++){ Print(ObjectName(i)); |
If you want to print out the names of the HLINEs, you need to find them, wherever they are in the list. | TotalHLines=0; for(int i=ObjectsTotal() - 1; i >= 0; i--){ string on = ObjectName(i); if( ObjectType(on) == OBJ_HLINE){ Print(on); TotalHLines++; } |
you're right! had to che k the experts tab.

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
hi there,
thanks for your assistance. I'm trying to write some code that will print out my horizontal lines but the script is loaded and then removed. Does the mrket have to be open to run or why doent it work?
anks, brad.