Summary: This heat study script generates values based on the subtraction of two indicators. Returns: first indicator value - second indicator value
' Use for holding indicator keys based on the first specified indicator key, indexed by symbol index. Redefine _indicatorKeys1(SymbolCount() - 1) ' Use for holding indicator keys based on the second specified indicator key, indexed by symbol index. Redefine _indicatorKeys2(SymbolCount() - 1) ' Iterate over all of the account symbols. For i As Integer = 0 To SymbolCount() - 1 ' Create an indicator for each symbol, based on the first specified indicator. _indicatorKeys1(i) = IndicatorCopy(indicatorKey1, i) ' Create an indicator for each symbol, based on the second specified indicator. _indicatorKeys2(i) = IndicatorCopy(indicatorKey2, i) Next
' Get the first indicator value, of the last bar index. Define values1 As Number = IndicatorValue(_indicatorKeys1(symbolIndex)) ' Get the second indicator value, of the last bar index. Define values2 As Number = IndicatorValue(_indicatorKeys2(symbolIndex)) Return values1 - values2