Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Moving Averages Question

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

    Moving Averages Question

    Is there a way to program moving averages to change color given different conditions?

    Example I want to have a 50 EMA on my chart.

    I'd like it to be green while rising and red while falling.

    What would be the easiest way for me to o that?

    #2
    Hello kmpc1,

    Thank you for your post.

    This is possible in NinjaScript. You can find a reference sample on this at the following link: http://www.ninjatrader.com/support/f...ead.php?t=3227

    Please let me know if I may be of further assistance.

    Comment


      #3
      You can even define three conditions: rising, falling and neutral. The slope values that are considered as flat are defined via a neutral threshold. The indicator allows to select from 27 different moving averages and is available here (open source):

      Attached Files

      Comment


        #4
        Thanks, this is great!

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        144 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        71 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X