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