Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MACD conversion

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

    MACD conversion

    Hello Ninjatrader Team,

    how can I set up MACD indicator to give me "percentage" of how much the spread between two lines exists. For example EMA 12 is above EMA 26 by 1 percent(this is what I want MACD to tell me), instead of EMA 12 is above EMA 26 by 10 points. I hope this question is clear enough. if not please let me know and il try to clarify better. thank you

    #2
    Hello wallsteetking,

    Thank you for your post.

    This will require editing the MACD in the following manner:
    1. First go to Tools > Edit NinjaScript > Indicator > MACD > OK
    2. Then right click in the MACD > select Save As > give the new MACD a name
    3. Then change line 72 to the following:
      Code:
      Diff.Set(((macd - macdAvg) / Value[0]) * 100);
    4. Then press F5 to compile
    5. Apply your new MACD to the chart

    This will show the Diff as percent.

    Please let me know if you have any questions.

    Comment


      #3
      Thank you Patrick

      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