Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Recognizing draw objects in code

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

    Recognizing draw objects in code

    Hi everyone

    In an indicator I'm developing, I'd like for the code to be able to react if the current bar is part of a draw object or not.

    In this particular case, the indicator successfully draws rectangles on the chart given certain conditions. I've been trying - but not succeeding - in finding a way to change the bar color (using the BarColor feature) whenever a bar occurs which is the very first bar in a sequence not to be part of a rectangle.

    I'd really appreciate any advice on how to achieve this. Thanks.

    #2
    There is code in the indicators by NT_ryanm, which provides alerts for manually drawn trendlines crosses. That would be a great place to start.

    Originally posted by arbuthnot View Post
    Hi everyone

    In an indicator I'm developing, I'd like for the code to be able to react if the current bar is part of a draw object or not.

    In this particular case, the indicator successfully draws rectangles on the chart given certain conditions. I've been trying - but not succeeding - in finding a way to change the bar color (using the BarColor feature) whenever a bar occurs which is the very first bar in a sequence not to be part of a rectangle.

    I'd really appreciate any advice on how to achieve this. Thanks.

    Comment


      #3
      Originally posted by arbuthnot View Post
      Hi everyone

      In an indicator I'm developing, I'd like for the code to be able to react if the current bar is part of a draw object or not.

      In this particular case, the indicator successfully draws rectangles on the chart given certain conditions. I've been trying - but not succeeding - in finding a way to change the bar color (using the BarColor feature) whenever a bar occurs which is the very first bar in a sequence not to be part of a rectangle.

      I'd really appreciate any advice on how to achieve this. Thanks.
      Stop thinking of it as a rectangle. Instead think of it as 2 separate levels, the price-top and the price-bottom. Now test for being away from those levels.

      Comment

      Latest Posts

      Collapse

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