Announcement

Collapse
No announcement yet.

ROC calculation bug

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

  • ROC calculation bug

    I am trying to show a 52-week ROC study on a weekly chart of TLT, but no data is coming up. There are more than 53 weeks of data for that symbol. It also is not working for IEF, SHY and LQD. It is working for everything else. It appears as if the EFS code is requiring more data than I really need for the computation. Is there any way to edit the study or is there a fix for this? Thanks

  • #2
    XML file change?

    there is an XML file that shows a default length of 20 for ROC which has a default number of days as 10. This I suppose means that it doubles the number of weeks of data needed, but it should be just one more week. Is there a way to edit this file and bring it to 11 which is all the weeks you need for a 10 week ROC?

    Comment


    • #3
      sposer,

      I am trying to show a 52-week ROC study on a weekly chart of TLT, but no data is coming up. There are more than 53 weeks of data for that symbol. It also is not working for IEF, SHY and LQD. It is working for everything else. It appears as if the EFS code is requiring more data than I really need for the computation. Is there any way to edit the study or is there a fix for this? Thanks

      Of course if you only have 53 weeks of data, a 52 week ROC will only show one bar of ROC data (on a weekly chart) - for the last week.

      Running a test on TLT, with the built in study (no EFS) I see what you are saying.

      In the case of TLT, which has 102 weekly bars there should be enough data to create your ROC, but interestingly you are correct no data is displayed for a 52 week (or over) ROC , but for 51 week ROC all works fine.

      I think you found a bug.

      Garth
      Garth

      Comment


      • #4
        seems as if it is expecting more data to show output. actually, shy still shows a 52-week, only because E-Signal has a bad link and is showing data from a prior stock that held that symbol. I tried editing the XML file, but that did not work. hopefully they can post a patch or give me a temporary replacement for ROC. i am fighting learning EFS even though I used to be a programmer!

        Comment


        • #5
          I don't think eSignal does patches as such, but hopefully this will get filed as a bug to be fixed in the next release.

          I'm not sure what .xml files you are talking about. The only xml files I am familiar with wrt eSignal are those generated by the backtester. So I'm at a loss as to what you are trying to do here. Maybe someone else can help.

          As for EFS, if you are really coding in EFS and need a 52week ROC that works for all symbols, I would write it myself. ROC is one of the easiest indicators to code, all it does is compare current close() (or high() or low (), etc) to the close (high(), low(), etc) x bars ago. Very, very simple. If you need help, just let me know.

          Garth
          Garth

          Comment


          • #6
            I found them in the keywords directory, so I am not sure of their use. In the end, I edited the file, and it did not change anything. It is clearly a bug, so I guess I will be forced to figure out EFS after all, much as it pains me. Thanks.

            Comment


            • #7
              sposer
              In the Library folder you should have roc.efs that does not use the builtin study
              Alex

              Comment


              • #8
                Thanks Alex. FYI, the ROC is not exactly the same. The library function has a bug. It should be (vnow-vthen)/vthen but it computes it as (vnow-vthen)/vnow. I fixed it on my system.

                Comment

                Working...
                X