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 Jimmyk, 01-26-2018, 05:19 AM
      6 responses
      835 views
      0 likes
      Last Post emuns
      by emuns
       
      Started by jxs_xrj, 01-12-2020, 09:49 AM
      6 responses
      3,291 views
      1 like
      Last Post jgualdronc  
      Started by Touch-Ups, Today, 10:36 AM
      0 responses
      11 views
      0 likes
      Last Post Touch-Ups  
      Started by geddyisodin, 04-25-2024, 05:20 AM
      11 responses
      62 views
      0 likes
      Last Post halgo_boulder  
      Started by Option Whisperer, Today, 09:55 AM
      0 responses
      9 views
      0 likes
      Last Post Option Whisperer  
      Working...
      X