Specifies the input or inputs for this indicator.
Namespace:
RightEdge.CommonAssembly: Common (in Common.dll) Version: 2010.1.0.0 (2010.1.0.0)
Syntax
| C# |
|---|
public void SetInputs( params Object[] inputs ) |
| Visual Basic (Declaration) |
|---|
Public Sub SetInputs ( _ ParamArray inputs As Object() _ ) |
| Visual C++ |
|---|
public: void SetInputs( ... array<Object^>^ inputs ) |
Parameters
- inputs
- Type: array<
System..::.Object
>[]()[]
Trigger inputs.
Remarks
Not only is this function used to set simple inputs such as
BarElement, it is also used for setting inputs from other indicator
instances. This is the basis for indicator "chaining".
Examples
Construct a smoothed EMA using indicator chaining(C#)
CopyC#
Indicators["EMA10"].CreateIndicator(new EMA(10)); // Create an instance of EMA that will be smoothed // using the instance above. Indicators["EMASmoothed"].CreateIndicator(new EMA(10)); // Specify the closing price as the input for our primary EMA. Indicators["EMA10"].SetInputs(BarElement.Close); // Chain EMASmoothed with EMA10 Indicators["EMASmoothed"].SetInputs("EMA10"); // Set the series color for the smoothed EMA Indicators["EMASmoothed"].SeriesColor = Color.Crimson; // Add smoothed EMA to the charts. Indicators["EMASmoothed"].AddToCharts();