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

Change ITrendChannel line color

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

    Change ITrendChannel line color

    Looks like draw objects like IRay have a .Pen property to allow adjusting the draw color.
    But with ITrendChannel there appears to be no access to the pen.

    Is there some other way I can programmatically adjust a TrendChannel line color?

    #2
    Hello foxthorn,

    Unfortunately, setting it programmatically would not be supported, but one way around it that you can do is set a Default Template for the TrendChannel inside of the chart so that way when your indicator draws the TrendChannel the Default Template would be applied to it.

    To save a default Template for the TrendChannel would be to draw one a chart, double left click on the object to open up the Properties window, set the changes you would like to see, right click in the Trend Channel Properties window, select Manage Templates, select Default, and press Save.

    Let us know if we can be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      The reason I wanted to change the color was to be able to hide some by setting the color to transparent. Is there an alternative way to hide and unhide the draw objects?

      Comment


        #4
        Hello foxthorn,

        If you are going to be via code you may want to use the RemoveDrawObject() and then Draw it back based upon the conditions that you want it hidden and unhidden.
        JCNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DJ888, 04-16-2024, 06:09 PM
        4 responses
        12 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by terofs, Today, 04:18 PM
        0 responses
        7 views
        0 likes
        Last Post terofs
        by terofs
         
        Started by nandhumca, Today, 03:41 PM
        0 responses
        6 views
        0 likes
        Last Post nandhumca  
        Started by The_Sec, Today, 03:37 PM
        0 responses
        3 views
        0 likes
        Last Post The_Sec
        by The_Sec
         
        Started by GwFutures1988, Today, 02:48 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Working...
        X