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 Hwop38, 05-04-2026, 07:02 PM
                  0 responses
                  160 views
                  0 likes
                  Last Post Hwop38
                  by Hwop38
                   
                  Started by CaptainJack, 04-24-2026, 11:07 PM
                  0 responses
                  308 views
                  0 likes
                  Last Post CaptainJack  
                  Started by Mindset, 04-21-2026, 06:46 AM
                  0 responses
                  245 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by M4ndoo, 04-20-2026, 05:21 PM
                  0 responses
                  349 views
                  0 likes
                  Last Post M4ndoo
                  by M4ndoo
                   
                  Started by M4ndoo, 04-19-2026, 05:54 PM
                  0 responses
                  178 views
                  0 likes
                  Last Post M4ndoo
                  by M4ndoo
                   
                  Working...
                  X