The Indicator object allows you to set the properties of a registered indicator. Indicator objects are created by the ChartManager.RegisterIndicator method.
HandlerObject
Type: Class VBScriptHandlerObject (see below)
Description: A reference to the VBScript handler object for this indicator
ID
Type: String
Description: The ID of this indicator
Description
Type: String
Description: A description of this indicator. The description will be used in the chart configuration dialogs.
AllowOnIntradayChart
Type: Boolean (Default = True)
Description: Whether this indicator is allowed to appear on intraday charts..
NumParameters
Type: Integer (Default = 0)
Description: How many parameters this indicator requires.
DefaultParameters
Type: String
Description: Default parameters for this indicator as a comma-separated list of values.
OverlayChart
Type: Boolean (Default = False)
Description: Whether this is an overlay indicator designed to be drawn on top of another chart (such as the Main chart).
OverlaysAllowed
Type: String
Description: If overlay charts are allowed on this indicator, this attribute should be filled in with "All" (meaning all overlays are allowed) or a comma-separated list of specific overlays that are allowed (such as "SMA,EMA"). This property is only valid for indicators that are not themselves overlays.
None
The VBScript handler object is described by a VBScript class with two methods as follows:
Class MyCustomIndicatorClass
Create [ChartObject object] [[ChartObject object]]
Recalc [ChartObject object]
End Class
When setting the HandlerObject property, you must create an instance of this class using new as follows:
chartobject.HandlerObject = new MyCustomIndicatorClass
None
Create(object [,object])
object: ChartObject
Description: The Create method is called to create the actual chart objects for the indicator. The first ChartObject object is always passed, it is the ChartObject representing the chart being created. The second ChartObject object is passed only for overlay indicators. It represents the ChartObject parent chart, and is passed in order to facilitate axis sharing.
Recalc(object)
object: ChartObject
Description: Recalc is called when the chart needs to recalculate the data for this indicator. At this point it is the responsibility of the script to make the appropriate calculations for the indicator and set the values in its dataset.