How to keep previous buffer if condition is not met?? - page 3

 
ironhak #: Hi, can you point me an example to this? Im asking because I made a script which calculate the average difference of highs and lows on a chosen TF for all the available candles. The script used iHigh(Symbol(), chosenTF, i) - iLow(Symbol(), chosenTF, i) where i goes from current bar to first bar avi able and at the end the script just reports delta/i. The point is that if For example I want average candle size of 1Day, then if I attach the script to two different timeframes of the same pair I will get very differente result… which of course shouldn’t be the case. Hope you understood, it would be helpful if you point me some places where I can find more about this. Thanks again for your kindness.

Unfortunately I did not understand your explanation, nor do I know what example you want.

If you want an example of how to build higher time data from the passed parameters, then I don't know of any such implementations except in my own personal code.

As for the use of iBarShift(), besides reading the documentation and reviewing the example code there, there are also plenty of posts by William Roeder that reference it especially for multi-timeframe. Run a search on his posts.