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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        85 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        47 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        29 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        67 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X