Fractal Sell/Down (Bill Williams)

Modified on 2013/08/16 10:54 by Administrator — Categorized as: Community Indicators

Syntax

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

Parameter Description

ds Any DataSeries. Typically pass Bars.Low

Description

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 low is less than the low of the two bars on either side of it. FractalDown returns the value of the most recent down/sell fractal as of the current bar.

See also: FractalDownBar, FractalUpBar, FractalUp, Alligator

Interpretation

A fractal "sell" occurs when price crosses below a down/sell fractal if it is below the Alligator teeth at the time of the crossing. You can use fractal sell signals to sell long positions and/or to add short positions.

Example

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 (fractalupbarsn > fractalupbarsn-1) { int fbar = (int)fractalupbarsn; AnnotateBar(_upFractal, fbar, true, Color.Silver, Color.Transparent, _wing); } if (fractaludnbarsn > fractaludnbarsn-1) { int fbar = (int)fractaludnbarsn; 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); } } }