Created = ObjectCreate(ChartID(),"Sell_Arrow "+TimeToString(Time[0],TIME_DATE|TIME_MINUTES);,OBJ_ARROW_SELL,0,Time[0],Level);
Use time in the object name
Thanks again Keith.
@Keith Watford mentions using time, which I have used.
I've also used a sequential number for this. It's just a global integer that I increment for each object I create.
@Keith Watford mentions using time, which I have used.
I've also used a sequential number for this. It's just a global integer that I increment for each object I create.
Thanks Anthony I'll keep that in mind.
@Keith Watford mentions using time, which I have used.
I've also used a sequential number for this. It's just a global integer that I increment for each object I create.
The advantage of using time can be that it is easier to locate it if you need to. Ie if you need to know how many bars back the arrow was painted.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I want my EA to print arrows on the chart to indicate where a trade was opened/closed. Is there anyway that we can draw multiple of the same object at different points in the chart?
For example I might want to create an arrow on the current bar:
And then I might want to do the exact same thing on the most recent fully formed bar:
But using the above method does not work - error 4200 (object already created) is returned if you write it this way.
...
Does this mean that we have to create a unique name for each individual arrow we place on the chart? Or is there a way that we can display multiple of the same created arrow at different points on the chart, effectively creating duplicates of the same object?