Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CCI add a horizontal line to the active point

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

    CCI add a horizontal line to the active point

    Hi everyone.

    I've been struggling and having no results to what seems a simple ambition. I am certain that someone here can help me.

    I would like to add a horizontal line that crosses the indicator entirely from left to right, attached to the forming point of the CCI line, being drawn dynamically of course.

    Any assistance would be greatly appreciated.

    #2
    Hello notenufftime,

    Thanks for your post.

    To clarify, are you wanting to draw a horizontal line at the CCI indicator plot value?

    If so, you could call Draw.HorizontalLine() method and pass in the CCI() indicator value for the double y argument of the Draw method.

    For example:

    Draw.HorizontalLine(this, "horizontalLine", CCI(14)[0], Brushes.Blue);

    Ensure that you have the DrawOnPricePanel property set to false and IsOverlay set to false to accomplish this.

    Attached is a simple example script demonstrating this concept that you could view.

    See the help guide documentation below for more information.

    CCI(): https://ninjatrader.com/support/help..._index_cci.htm
    Draw.HorizontalLine(): https://ninjatrader.com/support/help...zontalline.htm
    DrawOnPricePanel: https://ninjatrader.com/support/help...pricepanel.htm
    IsOverlay: https://ninjatrader.com/support/help...lay.htm​
    Attached Files
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hi NinjaTrader_BrandonH

      That is exactly what I was after and thank you for the example, making it quick and easy to confirm. Thank you for the docs too, I was basic in my description and that is exactly what you gave me, but I intend to dress it up a little.

      I'll go through the material and see what I can do. If I find myself lacking again, I'll be back.

      Two thumbs up!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      579 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 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
      554 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X