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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      175 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      331 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      253 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      356 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      183 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X