Announcement

Collapse
No announcement yet.

Adding and subtracting moving averages

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

  • Adding and subtracting moving averages

    I can't find any way in the Formula Wizard to accomplish this:

    MA 1 + (MA1 - MA2)

    How do I add and subtract a two MAs to create a new one?

    Sorry if this is really basic. I couldn't find an "EFS for utter newbies" forum.

  • #2
    Hello ccc243,

    You're in the right place, no worries.

    What you are trying to do is beyond the formula wizard's abilities. However, you can use the wizard to do most of the work. You'll then need to open the formula in the EFS Editor (Tools-->EFS) and modify the return statement at the end of main() to look something like below:

    PHP Code:
    return vEMA10.getValue(MAStudy.MA) + (vEMA10.getValue(MAStudy.MA) - vEMA20.getValue(MAStudy.MA)); 
    You should save the formula with a new name because once you modify the formula in the editor you will not be able to open it back up in the formula wizard.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Thank you for the quick reply Jason. I followed your advice and got it working right away. Thanks again.

      regards,

      Craig

      Comment

      Working...
      X