How is an indicator with a limited lookback handled when called as iCustom?

 

Hi,


I have a custom indicator that was starting to run very slow and after searching the forum and learning about limiting the number of lookback bars the indicator is very fast now.  BUT:  Let us say I limited the indicator to only do its calculations on the last 500 bars,  what would happen if I now call this indicator with iCustom with a shift of 2000?  Will indicator just not work, or will the shift value of 2000 become the "last bar" so that iCustom actualy start calculations from 2500th bar?

Thanks.

 
  1. Neither. The indicator does what the indicator does. Icustom/CopyBuffer just reads the buffer's value(s.) If the indicator doesn't put a value, then that element defaults to EMPTY_VALUE.

  2. You really need to fix the indicator. They don't just "start to run very slow." Most likely they are recalculating every bar every tick. Instead only update changed bars.
              How to do your lookbacks correctly.
Reason: