public bool isInsideBar(int bar) public bool isOutsideBar(int bar) public bool isGapUp(int bar) public bool isGapDown(int bar)
public enum GapType { PartialDown, FullDown, PartialUp, FullUp } public GapType isGap(int bar)
using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators;namespace WealthLab.Strategies { public class BarPatternsDemo : WealthScript { protected override void Execute() { for(int bar = 1; bar < Bars.Count; bar++) { if( this.isGapUp(bar) && this.isGap(bar) == CommonSignalsEx.GapType.FullUp ) AnnotateBar( "Gap Up", bar, true, Color.Blue ); if( this.isGapDown(bar) && this.isGap(bar) == CommonSignalsEx.GapType.FullDown ) AnnotateBar( "Gap Down", bar, false, Color.Red); } } } }