Tuesday, September 07, 2010

Indicator Value [IV]

Descripton
Summary:
This heat study script generates values based directly on the value of a single indicator.

Returns:
The indicator value


Variables
TypeIdentifierDescription
IntegerArray_indicatorKeysUse for holding all of the indicator keys duplicated from the specified indicator key and indexed by symbol index.

OnInitialize
Function Parameters
TypeIdentifierDescription
IndicatorindicatorKeyUse for the indicator key.
Implementation
	 ' Use for holding indicator keys based on the first specified indicator key, indexed by symbol index.
	Redefine _indicatorKeys(SymbolCount() - 1)
	
	 ' Iterate over all of the account symbols.
	For i As Integer = 0 To SymbolCount() - 1
		 ' Create an indicator for each account symbol, based on the specified indicator.
		_indicatorKeys(i) = IndicatorCopy(indicatorKey, i)
	Next

OnValue
Function Parameters
TypeIdentifierDescription
IntegersymbolIndex
Implementation
	 ' Get the indicator value, of the last bar index.
	Return IndicatorValue(_indicatorKeys(symbolIndex))

Copyright © 2010 IQBroker, LLC. All rights reserved.