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

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
    Brandon H.NinjaTrader Customer Service

    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 poplagelu, Today, 05:00 AM
      0 responses
      3 views
      0 likes
      Last Post poplagelu  
      Started by fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,407 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by Shai Samuel, 07-02-2022, 02:46 PM
      4 responses
      98 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by DJ888, Yesterday, 10:57 PM
      0 responses
      8 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by MacDad, 02-25-2024, 11:48 PM
      7 responses
      160 views
      0 likes
      Last Post loganjarosz123  
      Working...
      X