Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Guys need some help-Trend Line in strategy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    What is contained in the ... is whatever you want to draw the line with for filling out the DrawHorizontalLine() signature.

    Code:
    foreach (IDrawObject draw in DrawObjects)
    {
        if (draw.Tag.StartsWith("@") && draw is ILine)
        {
              Print("Global Line Object: " + draw.Tag + " Manually Drawn: " + draw.UserDrawn);
              ILine globalLine = (ILine) draw;
              globalLine.Pen.Color = Color.Black;
              Print(globalLine.StartBarsAgo + " " + globalLine.EndBarsAgo);
         }
    
         else if (draw is ILine)
         {
              ILine drawnLine = (ILine) draw;
              Print("Line Object: " + draw.Tag + " Manually Drawn: " + draw.UserDrawn + " " + drawnLine.StartBarsAgo + " " + drawnLine.EndBarsAgo);
         }
    }
    Josh P.NinjaTrader Customer Service

    Comment


      #17
      Getting properties of manually drawn objects

      Thanks Josh, that works fine!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by lismartin, Yesterday, 04:47 PM
      1 response
      15 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by facuevasm, Today, 07:28 AM
      2 responses
      4 views
      0 likes
      Last Post facuevasm  
      Started by ballston, Today, 06:32 AM
      0 responses
      8 views
      0 likes
      Last Post ballston  
      Started by Lando Calrissian, Today, 07:30 AM
      0 responses
      4 views
      0 likes
      Last Post Lando Calrissian  
      Started by Leeroy_Jenkins, Today, 03:45 AM
      0 responses
      13 views
      0 likes
      Last Post Leeroy_Jenkins  
      Working...
      X