Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

EMA of MACD

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

    EMA of MACD

    How would I apply a EMA to a MACD(EMA of the MACD).
    I know nothing about programming.
    Thanks for any help.
    Frank

    #2
    Frank,

    Unfortunately to do this would require programming.

    To get the EMA of a MACD you would do this:
    Code:
    EMA(MACD(12, 6, 9), 30)[0];
    This would give you an EMA of period 30 of MACD with parameters 12, 6, and 9.

    If you wanted the MACD to be running on an EMA you would do this:
    Code:
    MACD(EMA(30), 12, 6, 9)[0];
    If you wanted EMA of a MACD which is the MACD of an EMA you would do this:
    Code:
    EMA(MACD(EMA(30), 12, 6, 9), 30)[0];
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      Frank,

      Unfortunately to do this would require programming.

      To get the EMA of a MACD you would do this:
      Code:
      EMA(MACD(12, 6, 9), 30)[0];
      This would give you an EMA of period 30 of MACD with parameters 12, 6, and 9.

      If you wanted the MACD to be running on an EMA you would do this:
      Code:
      MACD(EMA(30), 12, 6, 9)[0];
      If you wanted EMA of a MACD which is the MACD of an EMA you would do this:
      Code:
      EMA(MACD(EMA(30), 12, 6, 9), 30)[0];
      Hi Josh, I have a similar qn. I want to get an SMA of MACD. I have done some VBA programming before so I understand the code, but I have no idea how I can go about creating this indicator and applying on the chart, could you please help me wiht some instructions there? I suppose I just need to do something like SMA(MACD(SMA(12, 26, 9), 5) for a 5 period SMA. But where exactly is the Ninjatrader "compiler" where I can enter this? And how can I implement it on my chart? Thanks a ton!

      Comment


        #4
        faceonthewall,

        You are using the wrong number of parameters for the MACD and the SMA. Please see the help guide articles for those indicators to see the correct syntax and parameters required for each.

        To create these you need to do it in the NinjaScript Editor. To get there go to Tools->New NinjaScript->Indicator. When you finish the Wizard it will bring you to the Editor where you can add the code.

        To add indicators to a chart, right click on the chart and select Indicators.

        I suggest you begin with these tutorials: http://www.ninjatrader-support.com/H...tml?Overview23
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Josh View Post
          faceonthewall,

          You are using the wrong number of parameters for the MACD and the SMA. Please see the help guide articles for those indicators to see the correct syntax and parameters required for each.

          To create these you need to do it in the NinjaScript Editor. To get there go to Tools->New NinjaScript->Indicator. When you finish the Wizard it will bring you to the Editor where you can add the code.

          To add indicators to a chart, right click on the chart and select Indicators.

          I suggest you begin with these tutorials: http://www.ninjatrader-support.com/H...tml?Overview23

          Thanks for the really quick reply mate. Yeah I meant SMA(MACD(12, 26, 9), 5). I will look at the tutorials then. Thanks a lot again!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Javierw.ok, Today, 04:12 PM
          0 responses
          4 views
          0 likes
          Last Post Javierw.ok  
          Started by timmbbo, Today, 08:59 AM
          2 responses
          10 views
          0 likes
          Last Post bltdavid  
          Started by alifarahani, Today, 09:40 AM
          6 responses
          40 views
          0 likes
          Last Post alifarahani  
          Started by Waxavi, Today, 02:10 AM
          1 response
          18 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by Kaledus, Today, 01:29 PM
          5 responses
          15 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X