3/10 Oscillator

Modified on 2014/04/08 11:31 by Eugene — Categorized as: Community Indicators

Syntax


public LBR3_10(DataSeries ds, int period1, int period2, string description)
public static LBR3_10 Series(DataSeries ds, int period1, int period2)

public LBR3_10_Histogram(DataSeries ds, int period1, int period2, int period3, string description) public static LBR3_10_Histogram Series(DataSeries ds, int period1, int period2, int period3)

public LBR3_10_Signal(DataSeries ds, int period1, int period2, int period3, string description) public static LBR3_10_Signal Series(DataSeries ds, int period1, int period2, int period3)

Parameter Description

ds The source DataSeries
period1 First simple moving average period
period2 Second simple moving average period
period3 Slow (signal) line period

Description

Linda Bradford Raschke's 3/10 Oscillator is essentially the well-known Moving Average Convergence Divergence indicator. The only substantial difference is in the type of moving average used: the 3/10 Oscillator is constructed with simple moving averages while MACD uses exponential MAs.

According to the author, the 3/10 Oscillator calculates the difference between a fast 3 bar simple moving average and a slower 10 bar simple moving average, and then adds a 16 bar simple moving average of the difference.

Interpretation

Refer to the MACD documentation.

Calculation

Here's an extract from Linda Raschke's site outlining the indicator construction:

To construct this oscillator, first subtract a 10 period simple moving average from a 3 period simple moving average. We often refer to this as the "fast line." Next, create a 16-period simple moving average of the "fast line" - we refer to this line as the "slow line." It is also useful to plot a horizontal line at the zero value. We plot all three lines together on our charts beneath the price.

Example

The following example will plot MACD and 3/10 Oscillator together to demonstrate their similarities and differences:


using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators;
using Community.Indicators;

namespace WealthLab.Strategies { public class CompareMACDwithLBR : WealthScript { protected override void Execute() { MACDEx macdex = MACDEx.Series(Close,3,10); MACDEx_Histogram macdexHist = MACDEx_Histogram.Series(Close,3,10); MACDEx_Signal3 macdSignal = MACDEx_Signal3.Series(Close,3,10,16);

LBR3_10 lbrOsc = LBR3_10.Series(Close,3,10); LBR3_10_Histogram lbrOscHist = LBR3_10_Histogram.Series(Close,3,10,16); LBR3_10_Signal lbrOscSignal = LBR3_10_Signal.Series(Close,3,10,16); ChartPane macdPane = CreatePane(50,true,true); ChartPane lbrPane = CreatePane(50,true,true); DrawHorzLine(macdPane,0,Color.Blue,LineStyle.Dashed,1); DrawHorzLine(lbrPane,0,Color.Blue,LineStyle.Dashed,1); HideVolume(); PlotSeries( macdPane, macdex, Color.Black, LineStyle.Solid, 2 ); PlotSeries( macdPane, macdexHist, Color.DarkGreen, LineStyle.Histogram, 1 ); PlotSeries( macdPane, macdSignal, Color.Red, LineStyle.Solid, 2 ); PlotSeries( lbrPane, lbrOsc, Color.Black, LineStyle.Solid, 2 ); PlotSeries( lbrPane, lbrOscHist, Color.DarkGreen, LineStyle.Histogram, 1 ); PlotSeries( lbrPane, lbrOscSignal, Color.Red, LineStyle.Solid, 2 );

} } }