Transfer location of objects on chart to CSV file

 
Can someone tell me how to get a list of the chart objects, their location and parameters to a csv file.
 
Is it possible to create an indicator that will load certain objects (named by the indicator) then after they are manually moved to new locations on the chart, use object_find and write_file to write a csv file with the new locations of the objects?
 
why shouldn't it be possible?
 
zzuegg:
why shouldn't it be possible?


I'm looking for an answer, not another question.
 

what exactly do you want?

get all the values from the objects and store them into csv.

In the init load values from csv and build objects.

 
Ideally, What I’m looking for is a piece of code that:

1. Finds the objects on a chart (i.e. Arrows at the highs and lows and /or vertical lines etc)

2. Writes a CSV file with the object type, time value, price value


I have code that can create objects from a CSV file to the chart, but not random named/placed objects from the chart to the file. I suppose the main problem is that ObjectFind looks for named objects. If the script hasn’t named the objects itself or hasn’t been told their names, it can’t find them. Manually naming each object would defeat the purpose of having a script to make an object list file.


The reason that I suggested that it may not be possible is because the script needs to find the objects to name them and the objects need names to find them. Of course each object gets a name when they are created but the script doesn’t recognize it unless it is told what it is. I am looking for direction in this because it seems that mql4’s limitations have created a paradox. Maybe some experienced coders have overcome this.


Essentially, the values in the file that the object list window is created from is what I need in a CSV file.
 



This is the information from you link Wh:


- int ObjectsTotal( int type=EMPTY)

- Returns total amount of objects of the specified type in the chart.


I appreciate the input. But "Returns total amount of objects" isn't Returns "the object type, time value, price value"


Can code be added to this function that would give the object type, time value, price value?

Please forgive my ignorance in this area, but my ignorance is why I am presenting this here.

 
Why not see all neighboring links while you're there? See ObjectDescription.
 

This is a serious query. I have many hours of research on this and I say this for those whose posts convey that they think this is an attempt to get others to do my homework for me or "give me a fish".


The responses have failed to satisfy the question. If that is the objective, please don't respond.


Please don't obscure the effort here if you don't understand the question, don't want the question answered or your answer doesn't is inadequate.


And for those who are reading this and understand and have the answer. I will be in your debt if you help me resolve this.


Thank you

 

if you take a look at the link WHRoeder posted you will see following example code:

  int    obj_total=ObjectsTotal();
  string name;
  for(int i=0;i<obj_total;i++)
    {
     name=ObjectName(i);
     Print(i,"Object name for object #",i," is " + name);
    }

this is a loop which outputs the names of all objects on the chart.

Should be easy modifying it to output price time ecc.

At next step it would be also easy to store that values into a csv.

And this is what you want....