Colorado Springs, CO
Experience: Beginner
Platform: NinjaTrader
Posts: 22 since Oct 2009
Thanks Given: 16
Thanks Received: 0
|
I'm currently using DrawRegion() from the top to the bottom of a Keltner Channel to highlight a bar.
I like this approach except for the fact that it offsets by half a bar.
I could be just as happy with a vertical line that runs from top to bottom of the channel but,
I can't seem to get DrawLine() to work...
At present, if the bool for autoscale is "false", the lines don't show and if "true", they do show but, run considerably higher and lower than the channel.
Example:
protected override void OnBarUpdate()
{
// Condition set 1
if (High[0] > KeltnerChannel(4, 50).Midline[0]
&& Low[0] < KeltnerChannel(4, 50).Midline[0])
{
DrawLine("My line" + CurrentBar, false, 0, KeltnerChannel(4, 50).Upper[0], 0, KeltnerChannel(4, 50).Lower[0] , Color.White, DashStyle.Solid, 2);
}
}
Here's the point where you smile and shake your head...
Go ahead, please show me the error of my ways...
Thanks in advance
|