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 »


Squeeze: Indicator Documentation

Syntax


DataSeries Squeeze( Bars bars, DataSeries ds, int period, double dev )

Parameter Description

bars Bars object
ds Data series
period Lookback period
dev Number of standard deviations for Bollinger Bands calculation

Description

From John F. Carter's book "Mastering The Trade". See his YouTube presentation.

  • Contractions like the Bollinger Bands inside the Keltner Bands reflect a market taking a break and consolidating, and is usually seen as a potential leading indicator of subsequent directional movement. A series of contractions may suggest to look for a BB expansion outside the KB which would be an entry signal. The longer the contraction, the stronger the potential breakout.
  • The entry should be made in the direction of the momentum. A positive momentum supports a long position, while a negative momentum supports a short position.
  • The exit should be made when momentum weakens.

Example

This example illustrates how to use the Squeeze indicator to build a trading strategy:


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 SqueezeStrategy : WealthScript { protected override void Execute() { PlotSeriesDualFillBand( PricePane, BBandUpper.Series( Close, 20, 2 ), BBandLower.Series( Close, 20, 2 ), Color.Transparent, Color.Blue, Color.Blue, LineStyle.Solid, 2 ); PlotSeriesDualFillBand( PricePane, KeltnerUpper.Series( Bars, 20, 20 ), KeltnerLower.Series( Bars, 20, 20 ), Color.Transparent, Color.Black, Color.Black, LineStyle.Solid, 3 ); Squeeze squeeze = Squeeze.Series( Bars, Close, 20, 2 ); ChartPane SqueezePane = CreatePane( 30, true, true ); PlotSeries( SqueezePane, squeeze, Color.Blue, LineStyle.Histogram, 3 );

for(int bar = 20; bar < Bars.Count; bar++) { if (IsLastPositionActive) { if( CumDown.Series( Momentum.Series( Close, 14 ), 1 )[bar] >= 1 ) SellAtMarket( bar+1, LastPosition, "MomExit" ); } else { if( squeeze[bar] < 0.00 ) BuyAtMarket( bar+1 ); } } } } }

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.