I am trying to filter certain indicator signals by initially checking whether price is close enough to manually drawn trendlines on my charts. So my indicator OnBarUpdate() starts with a clause
foreach (IDrawObject draw in DrawObjects) { if ( draw.UserDrawn && draw.DrawType == DrawType.HorizontalLine ) { //Is price close enough to this? If not just return from function, do nothing. (...) } }
(Bonus question: is there any way to get debug output from the indicator instance running within MA?)
Sorry if this has been covered before and thanks for your time.
Comment