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
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
MACD conversion
Collapse
X
-
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 youTags: None
-
Hello wallsteetking,
Thank you for your post.
This will require editing the MACD in the following manner:- First go to Tools > Edit NinjaScript > Indicator > MACD > OK
- Then right click in the MACD > select Save As > give the new MACD a name
- Then change line 72 to the following:
Code:Diff.Set(((macd - macdAvg) / Value[0]) * 100);
- Then press F5 to compile
- Apply your new MACD to the chart
This will show the Diff as percent.
Please let me know if you have any questions.
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
110 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
59 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
37 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
41 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
78 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment