How to use indicator's buffer in same indicator for another buffer in multi buffer indicator? - page 2

 
William Roeder #:
  1. You never set your arrays to as-series to match your buffers. ArraySetAsSeries

    1. Arrays must be manually sized. They have no direction. You must move elements if you want a stack/as-series (set non-series, enlarge the array, set as-series).

    2. Buffers are automatically size, are as-series, and elements are moved for you, new elements are set to EMPTY_VALUE (or your designated. They can also draw on the chart automatically.

    3. In MT4, buffers and the predefined arrays are all ordered AsSeries. There is a difference between the arrays passed to OnCalculate (e.g. low[]) and the MT4 predefined variables (e.g. Low[].) The passed arrays have no default direction, just like MT5.

    4. In MT5, you must set the direction.

  2. You are accessing your buffer as non-series, just don't set that.

  3. everything after the first return are irrelevant.

William Roeder #:


THNAK YOU William it works now. wish you the best of the bests.