Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to stop drawing Draw.Rectangle()

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

    #31
    Hello,

    Thanks for the reply.

    I am unable to reproduce this with your script. The draw objects will draw to the chart if I comment out the print statement. If there is only a Print statement within an IF condition, this will not affect logic flow for drawing to the chart. Are you sure you are compiling the code and reloading the script on the chart with F5? Are there any errors in the log tab of your Control Center.

    I look forward to your reply.

    Comment


      #32
      Chris,
      As you can see in the video below, the print statement does affect logic flow. No errors in the log tab. Its the only indicator on the chart.

      https://www.screencast.com/t/pskS8YhjVv6u

      Thanks,Woody.

      Comment


        #33
        Hello,

        Thanks for the reply.

        When you remove the Print statement, then the code underneath it will be evaluated only if the IF statement is true. When you have the Print statement added in, the code underneath the Print statement will always be run, because control is taken away from the IF block once the Print line has been executed.

        Example:

        Code:
        if(true)
                Print("This will be evaluated if true");
        {
                Print("This will be evaluated no matter what.");
        }
        Code:
        if(true)       
        {
                Print("This will be evaluated if true");
        }
        Please let us know if we may be of any further assistance.

        Comment

        Latest Posts

        Collapse

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