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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        68 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        38 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X