Oscillator (OSC)
For a list of all members of this type, see OSC Members.
System.Object
RQuant.Indicator.TTimeArray
RQuant.Indicator.TDoubleArray
RQuant.Indicator.TIndicator
RQuant.Indicator.OSC
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
An oscillator is the simple difference between two Moving Averages.
One trading rule is similar to the crossover system used in Moving Averages. In fact, the oscillator is another method of using two Moving Averages. Sell when the oscillator crosses the zero line from above to below. Buy when the oscillator crosses from below to above. Some traders buy the valleys and sell the peaks of the oscillator.
Formula:
TDataManager.cd("Demo");
TDailyArray Daily1 = TDataManager.GetStock("YHOO").DailyArray;
DateTime Date1 = DateTime.Parse("1999/02/08");
DateTime Date2 = DateTime.Parse("2000/12/29");
TDailyArray Daily = Daily1.Clone(Date1, Date2);
TCanvas Canvas = new TCanvas("Canvas","OSC DEMO",600,400);
Canvas.Divide(1,2);
OSC OSC = new OSC(Daily, 14, 20);
Canvas.cd(1);
Daily.Draw("c");
Canvas.cd(2);
OSC.Draw(Color.Red);
Namespace: RQuant.Indicator
Assembly: RQuant.Indicator (in RQuant.Indicator.dll)
OSC Members | RQuant.Indicator Namespace