Log in to see Cloud of Tags

Wealth-Lab Wiki

Gann Swing Oscillator


GannSwingOscillator: Indicator Documentation


DataSeries GannSwingOscillator( Bars bars, bool zero );

Parameter Description

bars A Bars object
zero True = with zero, False = discrete


The Gann Swing Oscillator is described in Robert Krausz's book "A W.D. Gann Treasure Discovered" and is a simple indicator that defines market swings. A Swing High is defined by 2 consecutive higher highs followed by 2 consecutive lower highs, and a Swing Low is defined by 2 consecutive lower lows followed by 2 consecutive higher lows. An Swing High is indicated by a +1 value of the oscillator while a Swing Low is indicated by a -1 value.

You have the option to plot a zero value or disable that feature. Regular version of the indicator keeps the last assigned value and stays that way until changed. With trailing zero enabled, the extremum value is triggered on that bar only. For all the other bars, it's not changed and therefore remains zero. This can be helpful to detect the bar on which a Swing High/Low took place.


Although the oscillator is designed to be used together with other Gann indicators created by Krausz as a trading system methodology, you can simply use it to find market direction to trade only with the established market trend.


This example illustrates how to plot and trade with the Gann Swing Oscillator.

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

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { GannSwingOscillator gsZero = GannSwingOscillator.Series( Bars, true ); GannSwingOscillator gsRegular = GannSwingOscillator.Series( Bars, false ); gsZero.Description = "Swings (with zero)"; gsRegular.Description = "Swings (regular version)"; HideVolume(); ChartPane gsPane1 = CreatePane( 30, true, false ); ChartPane gsPane2 = CreatePane( 30, true, false ); PlotSeries( gsPane1, gsZero, Color.Blue, LineStyle.Solid, 2 ); PlotSeries( gsPane2, gsRegular, Color.Blue, LineStyle.Solid, 2 ); } } }

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.

ScrewTurn Wiki. Some of the icons created by FamFamFam.