Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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!
        BertrandNinjaTrader Customer Service

        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?

                  BertrandNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by f.saeidi, Today, 11:02 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post f.saeidi  
                  Started by geotrades1, Today, 10:02 AM
                  3 responses
                  11 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by rajendrasubedi2023, Today, 09:50 AM
                  3 responses
                  15 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by lorem, Today, 09:18 AM
                  2 responses
                  11 views
                  0 likes
                  Last Post NinjaTrader_ChelseaB  
                  Started by geddyisodin, Today, 05:20 AM
                  4 responses
                  30 views
                  0 likes
                  Last Post geddyisodin  
                  Working...
                  X