Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    Gaby V.NinjaTrader Customer Service

    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.
        Gaby V.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by poplagelu, Today, 05:00 AM
        0 responses
        3 views
        0 likes
        Last Post poplagelu  
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,407 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        98 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        8 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        160 views
        0 likes
        Last Post loganjarosz123  
        Working...
        X