Announcement

Collapse
No announcement yet.

Indicator unintentionally offset

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

  • Indicator unintentionally offset

    Please take a look at the attached graphic. If you look at the vertical lines at the right side of the chart, you'll notice that the indicator is charting one period behind the price study.

    I have no idea why this is occurring. The code seems to me something straightforward enough, but clearly I'm missing something. I've also attached the code.

    Help would be appreciated.
    Attached Files
    Last edited by 0steve; 07-19-2006, 05:32 PM.

  • #2
    The code behind 'UnintentionalOffset'

    Dunno how to upload a graphic and a script in one fell swoop, so am sending a 'reply.'
    Attached Files

    Comment


    • #3
      Osteve
      When you perform a math calculation on a series the result is a value and not a series. Therefore because vSig2/vSig1 is returning a value the MACD functions interpret that as the optional barIndex parameter and displace the plots by an equivalent number of bars.
      You need to perform your calculations in a separate function [or efs] that you then call from main() using efsInternal() [or efsExternal()]. This will create the series which you can use as a source for the MACD functions.
      Alex

      Comment


      • #4
        Super Thanks

        Super thanks to the super moderator!

        Steve

        Comment

        Working...
        X