Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What is wrong with this Draw.Ray command?

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

    What is wrong with this Draw.Ray command?

    Draw.Ray(this, "rayH", 1, High[1], 0, High[1], Brushes.Red, DashStyle.Solid,2);
    Draw.Ray(this, "rayL", 1, Low[1], 0, Low[1], Brushes.Red, DashStyleHelper.Solid);

    Hint: It does not like DashStyle or DashStyleHelper

    These work fine:
    Draw.Ray(this, "rayH", 1, High[1], 0, High[1], Brushes.Red);
    Draw.Ray(this, "rayL", 1, Low[1], 0, Low[1], Brushes.Red);

    #2
    Hello morrnel,
    The syntax is not correct, correct syntax is :
    Code:
    Draw.Ray(this, "test", false, 1, High[1], 0, High[1], Brushes.Red, DashStyleHelper.Dash, 2);
    If you need solid style then specifying dash style not required, DashStyleHelper.Solid is correct usage. Also attaching syntax for reference. Hope it helps!
    Click image for larger version

Name:	ray dash style syntax.jpg
Views:	337
Size:	24.7 KB
ID:	1126626

    Comment


      #3
      Hello morrnel,

      s.kinra is correct in that the method call would need to match of the overload signatures in the help guide.


      Draw.Ray(NinjaScriptBase owner, string tag, bool isAutoScale, int startBarsAgo, double startY, int endBarsAgo, double endY, Brush brush, DashStyleHelper dashStyle, int width)
      Draw.Ray(NinjaScriptBase owner, string tag, bool isAutoScale, int startBarsAgo, double startY, int endBarsAgo, double endY, Brush brush, DashStyleHelper dashStyle, int width, bool drawOnPricePanel)


      DashStyleHelper would be correct.
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      666 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      377 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      110 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      575 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      580 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X