1. Find rectangles drawn by aomSDZones indicator
foreach (DrawingTool draw in DrawObjects.ToList())
{
if (draw is DrawingTools.Rectangle)
{
DrawingTools.Rectangle Rect = draw as DrawingTools.Rectangle;
if (Rect.DrawnBy != null)
{
if (Rect.DrawnBy.Name.Equals("aomSDZones"))
Print("Rectangle " + Rect.Tag + " is drawn by aomSDZones");
else
Print("Rectangle " + Rect.Tag + " is drawn by " + Rect.DrawnBy.Name);
}
else
Print("Rectangle " + Rect.Tag + " drawn manually");
}
}
2. Print names of indicators configured on the chart
if (ChartControl != null)
{
ChartObjectCollection<NinjaTrader.Gui.NinjaScript. IndicatorRenderBase> indicatorCollection;
foreach (NinjaTrader.Gui.NinjaScript.IndicatorRenderBase indicator in indicatorCollection)
{
Print ("Found Indicator " + indicator.Name);
if (indicator.Name.Equals("aomSDZones"))
{
Print (Name + ": * * * Found our aomSDZones indicator* * * ");
}
}
}
However, on another computer names of all indictors are empty. I mean Rect.DrawnBy.Name from the 1st piece and indicator.Name in the 2d.
What can cause such effect? Exactly the same source code is being compiled on both computers.
Comment