GetValue(Name, Place) as Number

The GetValue function returns the value of an existing indicator.

 

This function has two parameters:
Name   Name of the indicator you want to get the value. Always put the name of the indicator between " ".
Place   The place of the value you want to retrieve. Use an integer.

 

Example:

' GetValue is used in Indicators Builder, System Tester and Custom Reports Sub Main()
  For CurrentBar = BeginBar to EndBar
    I = GetValue("ROC", CurrentBar)
    J = GetValue("RSI", CurrentBar)
    If (I < -200) and (J < 25) and (J > 0) then Buy(CurrentBar)
    If (I > 200) and (J > 80) then Sell(CurrentBar)
    If VarSinceLastBuy < -4 then Sell(CurrentBar)
  Next
End Sub