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

How to calculate a moving average within a moving average

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

    How to calculate a moving average within a moving average

    This could be pretty simple, but when I try to calculate as follows:

    Default.Set(EMA(Close[0], af1), af2));

    I receive this error:

    The best overloaded method match for 'NinjaTrader.Indicator.Indicator.SMA(NinjaTrader.D ata.IDataSeries, int)' has some invalid arguments

    What must I change in order to get my goal?

    Thanks

    #2
    Hello pstrusi,
    Please modify your code as below as see if you can compile it successfully.

    Code:
    Default.Set(EMA(Close, af1)[0]);
    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Thanks a lot, yep, I saw my obvious error.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by PhillT, Today, 02:16 PM
      2 responses
      3 views
      0 likes
      Last Post PhillT
      by PhillT
       
      Started by Kaledus, Today, 01:29 PM
      3 responses
      9 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by frankthearm, Yesterday, 09:08 AM
      14 responses
      47 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Started by gentlebenthebear, Today, 01:30 AM
      2 responses
      14 views
      0 likes
      Last Post gentlebenthebear  
      Started by PaulMohn, Today, 12:36 PM
      2 responses
      17 views
      0 likes
      Last Post PaulMohn  
      Working...
      X