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:	351
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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      49 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      69 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      36 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      96 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      59 views
      0 likes
      Last Post PaulMohn  
      Working...
      X