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 rdtdale, Today, 01:02 PM
              1 response
              5 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by alifarahani, Today, 09:40 AM
              3 responses
              16 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by RookieTrader, Today, 09:37 AM
              4 responses
              19 views
              0 likes
              Last Post RookieTrader  
              Started by PaulMohn, Today, 12:36 PM
              0 responses
              10 views
              0 likes
              Last Post PaulMohn  
              Started by love2code2trade, 04-17-2024, 01:45 PM
              4 responses
              41 views
              0 likes
              Last Post love2code2trade  
              Working...
              X