Announcement

Collapse
No announcement yet.

Help - Moving Average of MACD

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

  • Help - Moving Average of MACD

    I am trying to replicate a statement from Tradestation in EFS .

    XAverage (MACD(close,19,39),9)

    Period Moving average of a difference of 2 other moving averages .

    How would I go about this in EFS ? I have seen examples of Moving averages of other indicators but in this case the other indicator is the combination of 2 simple indicators .

    Thanks

  • #2
    Billmini
    As far as I understand it that is a regular MACD with the difference that it uses an exponential average for the Signal Line.
    The attached basicMACD.efs will allow you to select in Edit Studies whether you want an exponential or simple average for the Signal Line (default is simple)
    Alex
    Attached Files

    Comment


    • #3
      Thanks Alex - That got me what I was looking for and it works .

      Much appreciated . Bill

      Comment


      • #4
        My question seems similar, so I thought I would post it here.

        Does eSignal have a way to do the following TS code? I wasn't sure how to develop it using standard "macd()" and "MACDStudy". Especially, since it doesn't seem there is a "smoothing" value specified. Is the equivalent just using a smoothing value of 1?

        PHP Code:
        F_MACD MACDCloseFaster_FastLengthFaster_SlowLength ) ;
        F_MACDAvg XAverageF_MACDFaster_MACDLength ) ;
        F_MACD_1 MACDClose[1], Faster_FastLengthFaster_SlowLength ) ; 
        Thanks!
        Daniel
        eSignal File Share: http://share.esignal.com/groupcontents.jsp?groupid=1130

        Comment


        • #5
          Originally posted by neoikon
          PHP Code:
          F_MACD MACDCloseFaster_FastLengthFaster_SlowLength ) ;
          F_MACDAvg XAverageF_MACDFaster_MACDLength ) ;
          F_MACD_1 MACDClose[1], Faster_FastLengthFaster_SlowLength ) ; 
          I'll answer my own question. To do the above TS code in eSignal's EFS, I came up with this:

          PHP Code:

          studyF_MACD 
          = new MACDStudyFaster_FastLengthFaster_SlowLengthFaster_MACDLengthPriceSourceOscSMASigSMA );
          var 
          F_MACD studyF_MACD.getValue(MACDStudy.MACD0);
          var 
          F_MACDAvg studyF_MACD.getValue(MACDStudy.SIGNAL0);
          var 
          F_MACD_1 studyF_MACD.getValue(MACDStudy.MACD, -1); 
          eSignal File Share: http://share.esignal.com/groupcontents.jsp?groupid=1130

          Comment


          • #6
            Hi Daniel,

            Good to hear you were able to work through this, but I noticed you used the older EFS1 methods.

            Are you familiar with the newer Series objects introduced with EFS2 ?

            Using the newer EFS2 methods and constructors are simpler and certainly more advanced (support multiple time-frames, etc), flexible and convenient.

            Steve

            Originally posted by neoikon
            I'll answer my own question. To do the above TS code in eSignal's EFS, I came up with this:

            PHP Code:

            studyF_MACD 
            = new MACDStudyFaster_FastLengthFaster_SlowLengthFaster_MACDLengthPriceSourceOscSMASigSMA );
            var 
            F_MACD studyF_MACD.getValue(MACDStudy.MACD0);
            var 
            F_MACDAvg studyF_MACD.getValue(MACDStudy.SIGNAL0);
            var 
            F_MACD_1 studyF_MACD.getValue(MACDStudy.MACD, -1); 

            Comment

            Working...
            X