Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Coppock Indicator by Edwin Coppock

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

    Coppock Indicator by Edwin Coppock

    Here is the Coppock Indicator developed by Edwin Coppock.

    To import -

    - Download attached file
    - Within NinjaTrader select the menu File > Utilities > Import NinjaScript
    - Select the downloaded file
    Attached Files
    RayNinjaTrader Customer Service

    #2
    Modified to calculate on daily, weekly and monthly charts.

    I have taken the liberty of modifying this so that it will plot correctly on weekly or daily charts. Originally this indicator was designed, and was a correct indicator, for monthly analysis only.

    See how you like it.

    Comments are welcome.
    Attached Files

    Comment


      #3
      Good work. Minor nitpicks though:

      1. The number of trading days in a year is more like 250. Ignoring holidays is like ignoring weekends, in my opinion. Instruments like stocks are "active" over the weekends too, because news still happens. Also, not everyone trades stocks.

      2. It seems that this indicator is ignoring your input parameters. ROCPeriod1, ROCPeriod2, and WMAPeriod are determined by the bar period type, so why have input parameters at all?

      Looking at your code taught me some things. I wasn't sure before how to determine bar period. Thanks.
      -Alex

      Comment


        #4
        Originally posted by anachronist View Post
        Good work. Minor nitpicks though:

        1. The number of trading days in a year is more like 250. Ignoring holidays is like ignoring weekends, in my opinion. Instruments like stocks are "active" over the weekends too, because news still happens. Also, not everyone trades stocks.
        Quite right. That is the point. 5 trading days per week is ignoring weekends. Hence I ignore other holidays too. I am aware that convention seems to use 250 days for a year, but a year is 52 weeks, not 50. The reasoning is explained in the file comments.

        2. It seems that this indicator is ignoring your input parameters. ROCPeriod1, ROCPeriod2, and WMAPeriod are determined by the bar period type, so why have input parameters at all?
        You are quite right. I had intended to put in an override, but then changed my mind when I decided that the Coppock Indicator actually never was designed for changable parameters. I left the input fields because when you run the indicator, the fields get filled in with the values used. Kind of like a feedback mechanism. I know that is actually using the fields in the reverse of the way that they were designed. Sort of an unintended consequence that I discovered.

        Looking at your code taught me some things. I wasn't sure before how to determine bar period. Thanks.
        -Alex
        Glad that I could help.

        Comment


          #5
          Originally posted by koganam View Post
          Quite right. That is the point. 5 trading days per week is ignoring weekends. Hence I ignore other holidays too. I am aware that convention seems to use 250 days for a year, but a year is 52 weeks, not 50. The reasoning is explained in the file comments.
          Um, no. Using 260 days includes holidays while excluding weekends. Yes, there are 260 weekdays in a year. About 9 of those weekdays are holidays distributed throughout the year. That leaves 251 trading days. As I said, however, it's a minor nitpick that won't make noticeable difference in your results.

          -Alex

          Comment


            #6
            Once again, you are actually right. Now why did I get confused about it? Oh well, I guess anyone reading can just adjust the code as necessary. It is a rather minor edit, so maybe I will just post a new version soon.

            Thanks for pointing it out. I am always happy to be shown to be wrong, as long as I learn something from it.

            Comment


              #7
              Here is the new version

              This one has adjustable parameters. In order to use the adjustable parameters, you must set the "user override" to true.

              Otherwise it behaves just like the original Coppock Indicator, that had fixed parameters, albeit this one will plot on a daily or weekly chart.
              Attached Files

              Comment


                #8
                I just tried to download this indicator and received an error message saying the import failed. Anyone else have this problem?

                Comment


                  #9
                  Originally posted by ETMTrader View Post
                  I just tried to download this indicator and received an error message saying the import failed. Anyone else have this problem?
                  What is the EXACT text of the error message?

                  Comment


                    #10
                    The message:

                    Import failed. The NinjaScript Archive File may contain duplicate method names that already exist on you PC or there is a required file missing on either your PC or in the import archive.


                    I contacted NinjaTrader support about this. He asked that I send him a copy of the file, which I did. He wrote back saying he encountered the same error when attempting to import this file. He recommended contacting the indicator's developer/vendor to report the issue.

                    Comment


                      #11
                      ETMTrader, can you please give the attached a try? The original file was posted for NT 6.5 and contained a deprecated DrawText signature that needed updating for NT7. Thanks.
                      Attached Files
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        Originally posted by ETMTrader View Post
                        The message:

                        Import failed. The NinjaScript Archive File may contain duplicate method names that already exist on you PC or there is a required file missing on either your PC or in the import archive.


                        I contacted NinjaTrader support about this. He asked that I send him a copy of the file, which I did. He wrote back saying he encountered the same error when attempting to import this file. He recommended contacting the indicator's developer/vendor to report the issue.
                        I am the original writer. That is why I asked for the exact text of the message.

                        I am glad to see that the issue has been resolved. Much as I suspected, it was the syntax of the DrawText() statement.

                        Comment


                          #13
                          Originally posted by ETMTrader View Post
                          I just tried to download this indicator and received an error message saying the import failed. Anyone else have this problem?
                          Hi ETM Trader, yes I haven't even received an error message. Perhaps I am using the wrong method of importing the script. Have you succeeded in getting it to work since your post?

                          Comment


                            #14
                            Originally posted by koganam View Post
                            This one has adjustable parameters. In order to use the adjustable parameters, you must set the "user override" to true.

                            Otherwise it behaves just like the original Coppock Indicator, that had fixed parameters, albeit this one will plot on a daily or weekly chart.
                            When I try to save this I get 'attachment.php' not a zip file. Am I missing something?

                            Comment


                              #15
                              Hello [email protected] ,

                              I was able to download http://ninjatrader.com/support/forum...9&d=1226183458 as attachment.zip using Firefox 45.0 , Internet Explorer 11.0.9600.18230 , and Chrome 49.0.2623.87 m (64-bit) and verify their contents as valid zip files. I would recommend using one of the above browsers to download with.
                              Jessica P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by geddyisodin, Yesterday, 05:20 AM
                              9 responses
                              50 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by George21, Today, 10:07 AM
                              1 response
                              11 views
                              0 likes
                              Last Post NinjaTrader_ChristopherJ  
                              Started by DayTradingDEMON, Today, 09:28 AM
                              3 responses
                              20 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by Stanfillirenfro, Today, 07:23 AM
                              9 responses
                              23 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by navyguy06, Today, 09:28 AM
                              1 response
                              9 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Working...
                              X