NexusFi: Find Your Edge


Home Menu

 





Changing the type of MA in the MACD


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Azrael with 5 posts (0 thanks)
    2. looks_two Abde with 2 posts (0 thanks)
    3. looks_3 cory with 2 posts (3 thanks)
    4. looks_4 artemiso with 1 posts (0 thanks)
    1. trending_up 1,943 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 8 posts
    2. attach_file 0 attachments




 
Search this Thread

Changing the type of MA in the MACD

  #1 (permalink)
 Azrael 
Jurong Singapore
 
Experience: Beginner
Platform: NinjaTrader
Broker: Optimus Futures/Rithmic
Trading: TF
Posts: 72 since Jul 2012
Thanks Given: 39
Thanks Received: 9

Hi guys,

I was wondering the MACD uses EMAs. I was wondering if is there a way to change the MA used, referencing it to maybe another MA I have, maybe say Simple Moving Average instead?

Any ideas how to script it or something to be imported into NT?

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
How to apply profiles
Traders Hideout
MC PL editor upgrade
MultiCharts
NexusFi Journal Challenge - May 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
What is Markets Chat (markets.chat) real-time trading ro …
77 thanks
Spoo-nalysis ES e-mini futures S&P 500
55 thanks
Just another trading journal: PA, Wyckoff & Trends
37 thanks
Bigger Wins or Fewer Losses?
24 thanks
The Program
17 thanks
  #2 (permalink)
 Abde 
Stuttgart / Germany
 
Experience: Intermediate
Platform: FlatTrader
Broker: GFT and Interactive Brokers
Trading: ES, DAX
Frequency: Every few days
Duration: Days
Posts: 533 since Aug 2010
Thanks Given: 2,141
Thanks Received: 729


Azrael View Post
Hi guys,

I was wondering the MACD uses EMAs. I was wondering if is there a way to change the MA used, referencing it to maybe another MA I have, maybe say Simple Moving Average instead?

Any ideas how to script it or something to be imported into NT?

Hi @Azrael,

You can use the MacdMultiMa where you have the choice of 4 MA´s (SMA, EMA, HMA, WMA). It´s an NT 6.5 indicator but works also in NT 7. Download is here: View Download Details - Big Mike's Trading Forum

Have fun!

Reply With Quote
  #3 (permalink)
 Azrael 
Jurong Singapore
 
Experience: Beginner
Platform: NinjaTrader
Broker: Optimus Futures/Rithmic
Trading: TF
Posts: 72 since Jul 2012
Thanks Given: 39
Thanks Received: 9



Abde View Post
Hi @Azrael,

You can use the MacdMultiMa where you have the choice of 4 MA´s (SMA, EMA, HMA, WMA). It´s an NT 6.5 indicator but works also in NT 7. Download is here: View Download Details - Big Mike's Trading Forum

Have fun!

Hi Abde,

Thanks for the link. However, I am actually using a propriety MA, and wanting to integrate into the MACD instead.

From what I know:
MACD line: difference between the 12 and 26 days EMAs
signal: 9 day EMA of the MACD line

So I wanna replace EMA with the propriety MA I subscribed to sort of test an idea =)

Could I edit the NT7 default indicator script with a text editor or something (I think I found a file called @MacD.cs)?

Started this thread Reply With Quote
  #4 (permalink)
 Abde 
Stuttgart / Germany
 
Experience: Intermediate
Platform: FlatTrader
Broker: GFT and Interactive Brokers
Trading: ES, DAX
Frequency: Every few days
Duration: Days
Posts: 533 since Aug 2010
Thanks Given: 2,141
Thanks Received: 729


Azrael View Post
Hi Abde,

Thanks for the link. However, I am actually using a propriety MA, and wanting to integrate into the MACD instead.

From what I know:
MACD line: difference between the 12 and 26 days EMAs
signal: 9 day EMA of the MACD line

So I wanna replace EMA with the propriety MA I subscribed to sort of test an idea =)

Could I edit the NT7 default indicator script with a text editor or something (I think I found a file called @MacD.cs)?

@Azrael,

If the propriety MA already exists in your NT, than I think it´s better to modify and rename an existing MACD. Just replace the EMA´s with your own MA. Good luck!

Reply With Quote
  #5 (permalink)
 Azrael 
Jurong Singapore
 
Experience: Beginner
Platform: NinjaTrader
Broker: Optimus Futures/Rithmic
Trading: TF
Posts: 72 since Jul 2012
Thanks Given: 39
Thanks Received: 9


Abde View Post
@Azrael,

If the propriety MA already exists in your NT, than I think it´s better to modify and rename an existing MACD. Just replace the EMA´s with your own MA. Good luck!

Thanks!

Do I just use notepad or something to edit it?

And could you be so kind to give me an example? I'm not too familiar with the script.

Started this thread Reply With Quote
  #6 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090

-import this MACDplus


1) Open NinjaTrader
2) From the Control Center -> Tools -> Edit NinjaScript -> Indicator
3) Select ninja MACDplus indicator and double click on it.
4) A new window will appear and you will need to right click, select save as and give it a name say mynewMACD
5) go to

protected override void OnStartUp()
{
SlowEMA=EMA(Input,Slow);
FastEMA=EMA(Input,Fast);
...........

6) change EMA to the exact name of MA you want to try. Note: the regular EMA takes 1 input value, if you have more than 1 input values this won't work.

7) hit F5 to compile your 'mynewMACD', if it doesn't come back with any error message you get yourself a new MACD.

Reply With Quote
Thanked by:
  #7 (permalink)
 Azrael 
Jurong Singapore
 
Experience: Beginner
Platform: NinjaTrader
Broker: Optimus Futures/Rithmic
Trading: TF
Posts: 72 since Jul 2012
Thanks Given: 39
Thanks Received: 9


cory View Post
-import this MACDplus


1) Open NinjaTrader
2) From the Control Center -> Tools -> Edit NinjaScript -> Indicator
3) Select ninja MACDplus indicator and double click on it.
4) A new window will appear and you will need to right click, select save as and give it a name say mynewMACD
5) go to

protected override void OnStartUp()
{
SlowEMA=EMA(Input,Slow);
FastEMA=EMA(Input,Fast);
...........

6) change EMA to the exact name of MA you want to try. Note: the regular EMA takes 1 input value, if you have more than 1 input values this won't work.

7) hit F5 to compile your 'mynewMACD', if it doesn't come back with any error message you get yourself a new MACD.

Noted!

Thank you very much!

Started this thread Reply With Quote
  #8 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090

@Azrael

for DMI and CCI just open ninja @DMI or @CCI, make a copy and replace their SMA with yours per instruction above.

Reply With Quote
Thanked by:
  #9 (permalink)
 Azrael 
Jurong Singapore
 
Experience: Beginner
Platform: NinjaTrader
Broker: Optimus Futures/Rithmic
Trading: TF
Posts: 72 since Jul 2012
Thanks Given: 39
Thanks Received: 9


cory View Post
@Azrael

for DMI and CCI just open ninja @DMI or @CCI, make a copy and replace their SMA with yours per instruction above.

I just realised Ninjatrader DMI and DM are two different things. What I wanted was the DM, DMI isn't the Directional Index (DMI/ADX).

For the DM, I looked at the script and saw no MA used. However, I remembered +DI and -DI used EMA in their calculations. Where do I find the EMA in them?

Sorry for the ton of questions.

Started this thread Reply With Quote




Last Updated on April 5, 2013


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts