Tuesday, September 07, 2010

Indicator Oversold [IOS]

Descripton
Summary:
This analyst script is used to determine whether an underlying indicator is oversold.

Values:
1. 0 - Not oversold.
2. 100 - Oversold.


Variables
TypeIdentifierDescription
Integer_analyzedIndicatorKeyUse for the indicator key to analyze for an oversold condition.
Number_oversoldValueUse for the minimum value below which the underlying indicator is considered oversold. [Default 20]

OnAnalysis
Function Parameters
TypeIdentifierDescription
IntegerbarIndex
Implementation
	 ' Check for an oversold condition.
	If (IndicatorValue(_analyzedIndicatorKey, barIndex) < _oversoldValue) Then
		Return 100
	End If
	
	Return 0

OnInitialize
Function Parameters
TypeIdentifierDescription
IndicatoranalyzedIndicatorKeyUse for the indicator key to analyze for an oversold condition.
NumberoversoldValueUse for the minimum value below which the underlying indicator is considered oversold. [Default 20]
Implementation
	 ' Assign the script parameters to script variables.
	_analyzedIndicatorKey = analyzedIndicatorKey
	_oversoldValue = oversoldValue

Copyright © 2010 IQBroker, LLC. All rights reserved.