Wealth-Lab Wiki

API ChartStyles Community Components Community Indicators IndexDefinitions Knowledge Base Misc Optimizers Pending Deletion PosSizers Providers Standard Indicators TASC Traders Tips TASCIndicators Tutorial Videos Visualizers
RSS

Navigation


Quick Search
»
Advanced Search »


Syntax

public static UltimateOsc Series(Bars bars)
public UltimateOsc(Bars bars, string description)

Parameter Description

bars The Bars object

Description

Williams' Ultimate Oscillator uses weighted sums of three oscillators, each using a different time period (7, 14, and 28), which represent short, medium, and long term market trends. The Ultimate Oscillator moves within the range of 0 to 100.

Interpretation

Williams recommended method of interpreting the Ultimate Oscillator is to look for divergences between the indicator value and price. For example, a bullish divergence occurs when prices make a lower low, but the Ultimate Oscillator fails to make a lower low.

Example

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

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { // Look for bullish divergences between Ultimate Oscillator and Price double t1, t2; int t1bar = -1; bool UUp = false; bool PUp = false;

ChartPane UltOscPane = CreatePane( 40, true, true ); PlotSeries( UltOscPane, UltimateOsc.Series( Bars ), Color.Black, WealthLab.LineStyle.Solid, 2 );

PeakTroughMode ptmode = PeakTroughMode.Value;// ( #AsPoint ); DataSeries UTrough = Trough.Series( UltimateOsc.Series( Bars ), 10, ptmode ); PlotSeries( UltOscPane, UTrough, Color.Green, LineStyle.Dots, 5 ); DataSeries PTrough = Trough.Series( Close, 10, ptmode ); PlotSeries( PricePane, PTrough, Color.Green, LineStyle.Dots, 3 ); for(int bar = 100; bar < Bars.Count; bar++) { t1 = Trough.Value( bar, UltimateOsc.Series( Bars ), 10, ptmode ); if( t1 != -1 ) t1bar = bar; t2 = Trough.Value( t1bar, UltimateOsc.Series( Bars ), 10, ptmode ); UUp = ( t1 > t2 ); t1 = Trough.Value( bar, Close, 10, ptmode ); if( t1 != -1 ) t1bar = bar; t2 = Trough.Value( t1bar, Close, 10, ptmode ); PUp = ( t1 > t2 ); if( UUp & !PUp ) SetBarColor( bar, Color.Green ); } } } }

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.

Used under license from FMR Corp. Copyright 2008 FMR Corp. All rights reserved.


ScrewTurn Wiki. Some of the icons created by FamFamFam.