Indexed Bars

 

Can I assign the Open and Close price of the previous bar like this:

Open1=Open[1];

Close1=Close[1]; 

Or should I do it this way:


i = Bars - counted_bars - 1; 

And then use in the form of:

Open[i+1];

Close[i+1];
Is it the same or not?
 

No, they are not the same

If you want 'price of bar just older than latest bar' use first option

If you want 'price of bar just older than the bar I'm looking at, as I work my way through all bars' use second

I expect the second is what you want, but maybe not.