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:	368
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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      68 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      151 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      100 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      288 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X