Log in to see Cloud of Tags

Wealth-Lab Wiki

Fractal Buy/Up (Bill Williams)



public FractalUp(DataSeries ds, string description)
public static FractalUp Series(DataSeries ds)

Parameter Description

ds Any DataSeries. Typically pass Bars.High


Fractals per Bill Williams in Trading Chaos, Second Edition are an indication of a change in market direction/behavior. An up (or buy) fractal is a minimum of 5-bar pattern where the center bar's high is greater than the high of the two bars on either side of it. FractalUp returns the value of the most recent up/buy fractal as of the current bar.

See also: FractalUpBar, FractalDown, FractalDownBar, Alligator


A fractal "buy" occurs when price crosses an up/buy fractal if it is above the Alligator teeth at the time of the crossing. You can use fractal buy signals to cover short positions and/or to add long positions.


The example plots the FractalUp and FractalDown Series and also uses the FractalUpBar and FractalDownBar indicators to annotate the fractal bars.

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 ShowFractalDemo : WealthScript { public void ShowFractals(DataSeries fractalupbars, DataSeries fractaludnbars) { Font _wing = new Font("Wingdings", 11, FontStyle.Bold); string _upFractal = Convert.ToChar(0x00D9).ToString(); string _dnFractal = Convert.ToChar(0x00DA).ToString(); for(int n = 5; n < fractalupbars.Count; n++) { if (fractalupbars[n] > fractalupbars[n-1]) { int fbar = (int)fractalupbars[n]; AnnotateBar(_upFractal, fbar, true, Color.Silver, Color.Transparent, _wing); } if (fractaludnbars[n] > fractaludnbars[n-1]) { int fbar = (int)fractaludnbars[n]; AnnotateBar(_dnFractal, fbar, false, Color.Silver, Color.Transparent, _wing); } } } protected override void Execute() { /* Fractals */ DataSeries frUpBar = FractalUpBar.Series(High); DataSeries frDnBar = FractalDownBar.Series(Low); ShowFractals(frUpBar, frDnBar); DataSeries frUp = FractalUp.Series(High); DataSeries frDn = FractalDown.Series(Low); PlotSeries(PricePane, frUp, Color.Blue, LineStyle.Dots, 3); PlotSeries(PricePane, frDn, Color.Fuchsia, LineStyle.Dots, 3); } } }

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.