Cromo: What I want is to scan all Rectangle objects in the chart and find the most recent object color. But I can not make it. Maybe to order the object time is not correct?
- Do you mean the "most recent object's color?"
- Objects do not have creation/modification times.
- They do have 1-3 coordinates (except for HLine) but which one to use? Did you draw your rectangle left to right or the other way?
- Where is your code remembering the newest coordinate and object's name?
- Or the "most recent color of an object?" There is only current color; recent implies history and that doesn't exist.

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, I want to pick up the most recent object color.
I have the indicator of rectangle. and I can read the color of the object and time of object draw.
What I want is to scan all Rectangle objects in the chart and find the most recent object color.
But I can not make it. Maybe to order the object time is not correct?
I used static value to compare the previous time and newer time and pick the most recent object color.
If the last color is red, then I will place sell order.
If the last color is green, then I will place buy order.
Can you point out the error of my code?