I had an indicator in NT7 that is partially ported to NT8.
What it did was give me an alert when a hand-drawn Horizontal or Ray lines were crossed. It is working in NT8 for horizontal lines but not Rays.
This is the code that searches for the lines
foreach (IDrawObject draw in DrawObjects)
{
// select User Drawn Horizontal or Ray Lines, and BLACK
if (draw.UserDrawn
&& (draw.DrawType == DrawType.Ray
|| draw.DrawType == DrawType.HorizontalLine))
{
//Sets some line properties programatically
ILine ThisLine = (ILine) draw;
if (ThisLine.Pen.Color == Color.Black
|| ThisLine.Pen.Color == Color.Cyan)
{
ProcessDrawObject(draw, ThisLine);
}
}
}
The ProcessDrawObject method receives the ILine object and then gets the anchors
//Sets right and left points depending on how line is drawn.
if (ThisLine.StartBarsAgo > ThisLine.EndBarsAgo)
{
LeftY = ThisLine.StartY;
RightY = ThisLine.EndY;
LeftBarsAgo = ThisLine.StartBarsAgo;
RightBarsAgo = ThisLine.EndBarsAgo;
}
else if (ThisLine.StartBarsAgo < ThisLine.EndBarsAgo)
{
LeftY = ThisLine.EndY;
RightY = ThisLine.StartY;
LeftBarsAgo = ThisLine.EndBarsAgo;
RightBarsAgo = ThisLine.StartBarsAgo;
}
then I can test for a line cross...
================================================== =================
in NT7 this worked for both Ray and Horizontalline....
a search in the NT8 online help does not produce resulte for "ILine".... ???
could it be that in NT8 a HorizontalLine and Ray have different interface objects?
1) if so, what is the interface object for Ray
and
2) where can I find them in the online doc?
thanks

Comment