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

new moving average

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

    new moving average

    Hello,

    There's plenty of moving average that has been added to NT.
    Why NT did not add the cumulative moving average to the list?




    By the way, anyone has the code for that CMA for NT?

    Thank you

    #2
    Hello frankduc,

    Thank you for your post.

    I can forward a request to our development team to include a CMA in a release. I have however created the indicator and posted it here to our forums at the following links:
    Please let me know if you have any questions.

    Comment


      #3
      Thank you,

      Its been years i am looking for it.

      There is just one thing you can not set a period like 20, 200 etc
      It looks like your cma is using the entire chart as a period.

      Is it possible to set a period without having to reduce the time frame?

      Last question how long did you take to code the cma? There's one guy who ask me 3000$ for it.

      I also did a test using the RMMA, i added to the RMMA the CMA and ask to return a 1444 period (its the entire number period in the chart) and CMA dont fit with the RMMA. Any idea why?

      I got an error saying impossible to convert int in double
      case MultiMA1types.CMA:
      Values[count][0] = CMA(i)[0];
      break;
      Attached Files
      Last edited by frankduc; 06-05-2018, 08:07 AM.

      Comment


        #4
        Hello frankduc,

        Thank you for your response.

        The CMA with a period would be the SMA indicator.

        This indicator took maybe 10 minutes to put together for 7 and 8.

        Can you provide a link to the RMMA you are using to test the CMA?

        I look forward to your response.

        Comment


          #5
          The RMMA we can find in the forum



          SMA and CMA are not the same. Actually for SMA = CMA, the SMA must refresh all periods at every new bar. A perfect CMA, you have 500 bars and you want 250 period CMA, the line will draw from half the chart to the right end.

          For exemple a SMA 10 will count every period the last 10 periods.

          A CMA 10 will start from the left of the chart counting 1, than second period will count last 2 periods, etc till period 10 at the end at right which will count the last 10 periods.

          What you did with your CMA is cumulate the total periods of the entire chart. Every candle it count the entire number of periods left in the chart.

          The formula in wiki return up until the current datum point. Yours return up until the end of the chart. It gives a false impression of CMA. Check excel file i included. In column H
          it return 2102.93 but if you change all the data in F and G for E$13 you will get 2102.27.

          Can i send you and excel file somehow ? Forum wont take it.
          Last edited by frankduc; 06-05-2018, 11:26 AM.

          Comment


            #6
            Hello frankduc,

            Thank you for your response.

            Please send the files over to platformsupport[at]ninjatrader[dot]com with 'ATTN: Patrick H' in the subject line and a reference to this thread in the body of the email.

            I look forward to your response.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by gwenael, Today, 09:29 AM
            0 responses
            0 views
            0 likes
            Last Post gwenael
            by gwenael
             
            Started by Karado58, 11-26-2012, 02:57 PM
            8 responses
            14,828 views
            0 likes
            Last Post Option Whisperer  
            Started by Option Whisperer, Today, 09:05 AM
            0 responses
            1 view
            0 likes
            Last Post Option Whisperer  
            Started by cre8able, Yesterday, 01:16 PM
            3 responses
            11 views
            0 likes
            Last Post cre8able  
            Started by Harry, 05-02-2018, 01:54 PM
            10 responses
            3,204 views
            0 likes
            Last Post tharton3  
            Working...
            X