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:	347
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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      78 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X