Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Sma with changing colour

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

    Sma with changing colour

    I am looking for a sma indicator that changes line colour if the current reading closes higher than previous bar, to green, for example and red for opposite. Also a third colour if the reading is the same as previous bar.

    If someone has such an indicator i would be really grateful if they could share it. I am not a techie so could not change code.. etc.

    Help would really be appreciated!

    #2
    Tonyb,

    This can be done through custom programming. I am not sure if this exact one has been made, but you can try searching in the File Sharing section.

    If it is not already made you could also try one of the 3rd party NinjaScript Consultants here as a last resort: http://www.ninjatrader.com/webnew/pa...injaScript.htm
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      charges to Tony's rescue once again! :P

      um, seriously, I found the sample code Josh had up for enumerated types ( Note to Josh, being able to find it with search words "moving average" would have helped )

      So....BEHOLD the color sample universal moving average. The code is pretty straight forward to add to if you need to and it's a fair approach to changing plot colors based on a condition.

      Attached Files

      Comment


        #4
        Thanks for your help here Newshues!

        Comment


          #5
          thanks again Newshoes. Actually I did look through the forum but could not find an indicator to suit.

          You are a lifesaver,,lol,, thx again

          Comment


            #6
            color sample universal moving average

            when usings dots to plot Color sample universal moving average, the last dot sometimes changes color as the new price bar is forming.Is there any way to prevent this from happening

            Comment


              #7
              You could try CalculateOnBarClose = true for the indicator.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Sma with changing colour

                i tried CalculateOnBarClose = true and the problem is still there..might it be something in the way the proram is written

                Comment


                  #9
                  Jake, do you only see this witn the dot plotstyle is used?

                  Have you tried this, too?

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  571 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  330 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  101 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  548 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  549 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X