Use
"Rectangle"+i
instead
"Rectangle1"
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
I am not sure where to go from here
for(int i=50; i>1; i--) //count from bars down ie: 50 to 0 { ObjectCreate("Rectangle1", OBJ_RECTANGLE, 0, Time[i], High[i], Time[i-1], Low[i-1]); ObjectSet("Rectangle1", OBJPROP_COLOR, LightBlue ); ObjectSet("Rectangle1", OBJPROP_RAY, 0 ); }This code just draws one rectangle, how do i get it to keep drawing new rectangles as it loops through the bars and not lose the rectangles already drawn ?
thanks :)