Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw.Ray issue

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

    Draw.Ray issue

    I'm trying to draw ray at the spot highlighted in the screenshot ​. My code is below

    Draw.Ray(this, Low[2].ToString(),2,Low[2],0,Low[2],true,"test");

    it does't draw. Any ideas? TY!
    Attached Files

    #2
    Hello cay7man,

    Thank you for your post.

    First, are there any errors in the Log tab of the Control Center? Are you making sure to check if at least 2 bars have been processed before using Low[2]?

    Check using CurrentBar - https://ninjatrader.com/support/help...currentbar.htm

    To understand exactly how your script is behaving, such as not drawing objects when expected, it is necessary to add prints to the script that print the values used for the logic of the script to understand how the script is evaluating.

    Add a print one line above the condition to call the Draw method to print out all the values of all the condition.

    Add a print one line above the Draw method to print out the values the draw method is being drawn at.

    Below is a link to a forum post that demonstrates how to use prints to understand behavior.

    https://ninjatrader.com/support/foru...121#post791121

    Comment


      #3
      No errors and there are enough bars to the draw the ray as in the screenshot. I did add prints. The Draw.Ray works fine bars prior to the starting bar in the screenshot.

      Comment


        #4
        Hello,

        Can you please share the results of your prints from the output?

        Save the output from the output window to a text file and provide this with your reply.

        Make sure the prints are descriptive, print all the values values of all the condition and the values used in the Draw method. It is very important to include a text label for each value and for each comparison operator in the print to understand what is being compared in the condition sets.

        I'll be happy to assist with analyzing the output.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        656 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        371 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        579 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X