Log in to see Cloud of Tags

Wealth-Lab Wiki

TASC 2010-07 | Anchored VWAP Channel (Coles)

RSS

Traders' Tip text

The Anchored VWAP Channel indicators, MidasUpper and MidasLower, can be found in Wealth-Lab’s TASCIndicators library June update. The script provided here provides the simple visual method to use the channel by using the sliders to assign bar numbers to the start and swing points. Arrows indicate the current channel’s anchor points. Since we’re dealing with bar numbers, use the sliders for coarse adjustment and fine tune by specifying a parameter’s bar number, as shown. One approach to objectively evaluating the channel might be to identify the first X% swing points at the start of each trading day, and developing a breakout strategy based on channel support and resistance.


Image

Figure 1. Although the channel appears to have some predictive power, subjective determination of the start and swing points (arrows) clearly influence the outcome.


WealthScript Code (C#)

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

namespace WealthLab.Strategies { public class AnchoredVWAPChannel : WealthScript { private StrategyParameter _startBar; private StrategyParameter _barsToUpper; private StrategyParameter _barsToLower; public AnchoredVWAPChannel() { _startBar = CreateParameter("Start Bar",2300,0,10000,5); _barsToUpper = CreateParameter("Bars to Upper",23,0,200,1); _barsToLower = CreateParameter("Bars to Lower",32,0,200,1);

} protected override void Execute() { int startBar = _startBar.ValueInt; int barsToUpper = _barsToUpper.ValueInt; int barsToLower = _barsToLower.ValueInt; Font font = new Font("Wingdings", 8, FontStyle.Bold); string upArrow = Convert.ToChar(0x00E9).ToString(); string dnArrow = Convert.ToChar(0x00EA).ToString(); AnnotateBar(upArrow, startBar + barsToLower, false, Color.Green, Color.Transparent, font); AnnotateBar(dnArrow, startBar + barsToUpper, true, Color.Red, Color.Transparent, font);

PlotSeries(PricePane,MidasLower.Series(Bars, startBar, barsToLower),Color.Black,LineStyle.Solid,1); PlotSeries(PricePane,MidasUpper.Series(Bars, startBar, barsToUpper),Color.Black,LineStyle.Solid,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.


ScrewTurn Wiki. Some of the icons created by FamFamFam.