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 Spiderbird, Today, 12:15 PM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_ChristopherJ  
              Started by FrazMann, Today, 11:21 AM
              1 response
              6 views
              0 likes
              Last Post FrazMann  
              Started by lorem, Yesterday, 09:18 AM
              5 responses
              18 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by cmtjoancolmenero, Yesterday, 03:58 PM
              12 responses
              42 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by geddyisodin, Yesterday, 05:20 AM
              8 responses
              52 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Working...
              X