﻿DivideSeries Class
Divides two series.

Namespace: RightEdge.Indicators
Assembly: Indicators (in Indicators.dll) Version: 2010.1.0.0 (2010.1.0.0)

# Syntax

C#
```[SerializableAttribute]
public class DivideSeries : SeriesCalculatorBaseSimple```
Visual Basic
```<SerializableAttribute>
Public Class DivideSeries
Inherits SeriesCalculatorBaseSimple```
Visual C++
```[SerializableAttribute]
public ref class DivideSeries : public SeriesCalculatorBaseSimple```
F#
```[<SerializableAttribute>]
type DivideSeries =
class
inherit SeriesCalculatorBaseSimple
end```

# Remarks

While not really an indicator per se, this is a utility class that will take two series or a series and a constant and divide them to produce a resulting series.

# Examples

The following code example demonstrates how to use the add, subtract, divide and multiply utility series in a trading system.
C# Copy
```public class MySymbolScript
{
// Declare the indicators
public SubtractSeries subSeries;
public DivideSeries divSeries;
public MultiplySeries multSeries;

public void Startup()
{
// Instantiate instances of the add, subtract, divide,
// and multiply series
subSeries = new SubtractSeries();
multSeries = new MultiplySeries();
divSeries = new DivideSeries();

// Sum the high and low prices
sumSeries.SetInputs(High, Low);
// Draw the sum series in blue
sumSeries.ChartSettings.Color = Color.Blue;

// Subtract high from low in this series
subSeries.SetInputs(High, Low);
// Draw the subtract series in red
subSeries.ChartSettings.Color = Color.Red;

// Multiply high times the low in this series
multSeries.SetInputs(High, Low);
// Draw the multiply series in green
multSeries.ChartSettings.Color = Color.Green;

// Divide the high price by the low price in this series
divSeries.SetInputs(High, Low);
// Draw the divide series in yellow
divSeries.ChartSettings.Color = Color.Yellow;
}

public void NewBar()
{

// These lines demonstrate how to access the current value of the indicators.
double subVal = subSeries.Current;
double multVal = multSeries.Current;
double divVal = divSeries.Current;
}
}```
Visual Basic.Net Copy
```Public Class MySymbolScript
' Declare the indicators
Public subSeries As SubtractSeries
Public divSeries As DivideSeries
Public multSeries As MultiplySeries

Public Sub Startup()
' Instantiate instances of the add, subtract, divide,
' and multiply series
subSeries = New SubtractSeries()
multSeries = New MultiplySeries()
divSeries = New DivideSeries()

' Sum the high and low prices
sumSeries.SetInputs(High, Low)
' Draw the sum series in blue
sumSeries.ChartSettings.Color = Color.Blue

' Subtract high from low in this series
subSeries.SetInputs(High, Low)
' Draw the subtract series in red
subSeries.ChartSettings.Color = Color.Red

' Multiply high times the low in this series
multSeries.SetInputs(High, Low)
' Draw the multiply series in green
multSeries.ChartSettings.Color = Color.Green

' Divide the high price by the low price in this series
divSeries.SetInputs(High, Low)
' Draw the divide series in yellow
divSeries.ChartSettings.Color = Color.Yellow
End Sub

Public Sub NewBar()