SetValue(Place, Value)

SetValue is used to set the value of a selected place in an indicator. If you want to set an array at once, use SetIndic.

 

This procedure has two parameters:
Place   Where the value will be put, typically the variable of the For loop.
Value   The value of the indicator at the selected place.

 

Example:

' This is an indicator
Sub Main()
  For CurrentBar = 13 to Last
    Roc1 = 100 * (Close(CurrentBar ) - Close(CurrentBar - 12))
    SetValue CurrentBar, Roc1
  Next
End Sub