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

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 Rapine Heihei, Today, 08:19 PM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Rapine Heihei, Today, 08:25 PM
      0 responses
      6 views
      0 likes
      Last Post Rapine Heihei  
      Started by f.saeidi, Today, 08:01 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by Rapine Heihei, Today, 07:51 PM
      0 responses
      8 views
      0 likes
      Last Post Rapine Heihei  
      Started by frslvr, 04-11-2024, 07:26 AM
      5 responses
      98 views
      1 like
      Last Post caryc123  
      Working...
      X