Announcement

Collapse
No announcement yet.

EFS2 MACD Signal line - exponetial or simple?

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

  • EFS2 MACD Signal line - exponetial or simple?

    Hi all,

    I am programming a straight forward MACD in EFS. Looking at it and comparing it to the standard eSignal one, I see slight differences.

    As far as I can see, the EFS2 is using exponential whereas I prefer a simple one, both for the differential and the signal line.

    I use:
    macd_fast = macd(MACD_FAST, MACD_SLOW, MACD_SMOOTH);

    macd_fast_old = macd(MACD_FAST, MACD_SLOW, MACD_SMOOTH, -MACD_SMOOTH+1);

    I don't see anything in the online documentation on how to force it to simple.
    Any ideas?

    All the best...

  • #2
    C-J
    That option is not available in the EFS2 version of the MACD study.
    A very easy workaround could be to use the Price Oscillator that is available in the amStudies function library as a substitue for the MACD and then calculate a simple moving average of that for the Signal line. See this post for information on the Price Oscillator and this post for the amStudies library.
    Alex

    Comment


    • #3
      Or - I guess - I could just use the old EFS version:

      MACDStudy(FastLength, SlowLength, SignalSmoothing, PriceSource, SimpleMA)

      I don't see what format the last one takes. Is it a simple boolean? And does PriceSource take a null?

      Sorry, online documentation seems a bit lacking.

      All the best...

      Comment


      • #4
        C-J
        Yes of course you can. If you look in the Builtin subfolder of Formula you will find one already programmed that includes the options for the type of average used in both the MACD and Signal lines.
        Alex

        Comment


        • #5
          Alex, thanks for the pointer.

          Now I only need to know how to find a value ex. 16 bars old on the MACD line.

          Is the only way to use ref() and then pick from a two-dimensinal array?

          (Since I am on the brink of thinking it would be faster to program this thing from scratch, surely I am missing something).

          All the best...

          Comment


          • #6
            C-J
            You do not need to do that. With builtin studies you can access any historical value directly. For example study.getValue(MACDStudy.MACD,-10) will retrieve the value of the MACD of 10 bars ago
            Alex

            Comment


            • #7
              Alex, just what I needed to know, thank you.

              Over and Out from here.

              Comment

              Working...
              X