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 r68cervera, Today, 05:29 AM
|
0 responses
3 views
0 likes
|
Last Post
by r68cervera
Today, 05:29 AM
|
||
Started by geddyisodin, Today, 05:20 AM
|
0 responses
6 views
0 likes
|
Last Post
by geddyisodin
Today, 05:20 AM
|
||
Started by JonesJoker, 04-22-2024, 12:23 PM
|
6 responses
35 views
0 likes
|
Last Post
by JonesJoker
Today, 05:14 AM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
12 responses
3,241 views
0 likes
|
Last Post
by Leafcutter
Today, 05:08 AM
|
||
Hi
by AveryFlynn
Started by AveryFlynn, Today, 04:57 AM
|
0 responses
7 views
0 likes
|
Last Post
by AveryFlynn
Today, 04:57 AM
|
Comment