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); } } }