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 NullPointStrategies, Today, 05:17 AM
              0 responses
              20 views
              0 likes
              Last Post NullPointStrategies  
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              119 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              63 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              41 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              45 views
              0 likes
              Last Post TheRealMorford  
              Working...
              X