Miscellaneous
0
Views
0
Downloads
0
Favorites
test_objects_list
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
//+------------------------------------------------------------------+
//| test_objects_list.mq4 |
//| Copyright © 2006, MQLService |
//| http://www.mqlservice.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, MQLService"
#property link "http://www.mqlservice.com"
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
//----
// writing the chart objects list to the file
int handle, total;
string obj_name,fname;
// file name
fname="objlist_"+Symbol()+".txt";
handle=FileOpen(fname,FILE_CSV|FILE_WRITE);
if(handle!=false)
{
total=ObjectsTotal();
for(int i=0;i<total;i++)
{
obj_name=ObjectName(i);
FileWrite(handle,TimeToStr(ObjectGet(obj_name, OBJPROP_TIME1))+", "+obj_name+", "+ObjectDescription(obj_name));
}
FileClose(handle);
}
//----
return(0);
}
//+------------------------------------------------------------------+
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---