Skip to content

Instantly share code, notes, and snippets.

@DexterHaslem
Created April 21, 2015 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DexterHaslem/a9691abdb50d59623c21 to your computer and use it in GitHub Desktop.
Save DexterHaslem/a9691abdb50d59623c21 to your computer and use it in GitHub Desktop.
ChartDot myDot;
protected override void OnBarUpdate()
{
if (CurrentBar == 0)
{
//myDot = Draw.Dot(this, "myDot", true, Time[0], Close[0], Brushes.Orange);
myDot = Draw.Dot(this, "myDot", true, 0, Close[0], Brushes.Orange);
}
else if (myDot != null && CurrentBar > 2)
{
// move by drawn on bar
if (CurrentBar % 2 == 0)
myDot.Anchor.DrawnOnBar = CurrentBar;
else
myDot.Anchor.Time = Time[0];
myDot.AreaBrush = new[] { Brushes.Red, Brushes.Green, Brushes.Blue }[CurrentBar % 3];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment