double NewPrice1=1.0000; double NewPrice2=2.0000; ObjectSet("MyRectangle",OBJPROP_PRICE1,NewPrice1); ObjectSet("MyRectangle",OBJPROP_PRICE2,NewPrice2);
Yes! :D
But I have another question: When the rectangle should expand until the current bar, I use TimeCurrent() as TIME2. But what to I have to add if I want the rectangle be expanded one more bar more to the right? I saw that time values for the future are done like Time[0]+86400. But I don't know exactly the 86400 means. So what must I add to Time[0] or TimeCurrent() to expand it one more bar?
Yes! :D
But I have another question: When the rectangle should expand until the current bar, I use TimeCurrent() as TIME2. But what to I have to add if I want the rectangle be expanded one more bar more to the right? I saw that time values for the future are done like Time[0]+86400. But I don't know exactly the 86400 means. So what must I add to Time[0] or TimeCurrent() to expand it one more bar?
Time[0]+Period()*60
But if it happens that the next bar does not immediately follow the close of the current bar (weekend or missing bar) it will revert to the same as Time[0]
Time[0]+Period()*60
But if it happens that the next bar does not immediately follow the close of the current bar (weekend or missing bar) it will revert to the same as Time[0]

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys,
I use a script to print a rectangle to display support and resist zones. Now my problem is that the script only prints the rectangles to the current bar because I use TimeCurrent() as the second time value. I read in another thread that a future time value expands the rectangle like a ray. I tried it and it worked fine. But then I have the problem that I can't change the height of the rectangle. Sometimes I have to adjust the support and resist zones. Then I doubleclick on the rectangle and change the height a little bit and that is not possible with a rectangle which reaches out of the screen.
Therefore I thought about making an indicator which gets the information of all rectanges displayed in the chart, deletes them and creates the same rectangles but with a new TimeCurrent(). This is the only idea I have to keep a rectangle updated.
Has anyone a better idea? Thanks!!