Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Setting the color of an indicator in code

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

    Setting the color of an indicator in code

    I am trying to set the color of an indicator using code instead of doing it from the chart. I can change the color in the indicators code but all lines of that indicator would be the same color. Any help would be greatly appreciated.

    Thanks,
    Coby B.

    #2
    Originally posted by cbart_1 View Post
    I am trying to set the color of an indicator using code instead of doing it from the chart. I can change the color in the indicators code but all lines of that indicator would be the same color. Any help would be greatly appreciated.

    Thanks,
    Coby B.
    Hello Coby,

    Thank you for your post.

    Here is a sample from the "Reference Samples" section of Support Forum: http://www.ninjatrader-support2.com/...ead.php?t=3227
    Ray S.NinjaTrader Customer Service

    Comment


      #3
      Didn't Help

      Thanks but that didn't help.

      Comment


        #4
        Originally posted by cbart_1 View Post
        Thanks but that didn't help.
        Can you explain exactly what you are trying to accomplish?

        Thank you!
        Ray S.NinjaTrader Customer Service

        Comment


          #5
          What im trying to do

          instead of this:
          protectedoverridevoid Initialize()
          {
          Add(EMA(
          14));
          Add(SMA(
          40));
          CalculateOnBarClose =
          true;
          }

          I would like to be able to set te color of the line here. I could not figure out how to do it with the sample given below. It is no big deal, but it would be nice so I wouldn't have to change the color of the lines once I backtest, optimize, or just look at it on a chart.

          Comment


            #6
            Please see this tip for setting indicator defaults for a strategy: http://www.ninjatrader-support2.com/...ead.php?t=3228
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              That Worked

              Thank you very much That helps a lot.

              Thanks,
              Coby B.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by DannyP96, 05-18-2026, 02:38 PM
              1 response
              23 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 05-11-2026, 05:56 AM
              0 responses
              115 views
              0 likes
              Last Post CarlTrading  
              Started by CarlTrading, 05-10-2026, 08:12 PM
              0 responses
              68 views
              0 likes
              Last Post CarlTrading  
              Started by Hwop38, 05-04-2026, 07:02 PM
              0 responses
              225 views
              0 likes
              Last Post Hwop38
              by Hwop38
               
              Started by CaptainJack, 04-24-2026, 11:07 PM
              0 responses
              409 views
              0 likes
              Last Post CaptainJack  
              Working...
              X