Announcement

Collapse
No announcement yet.

Is It Possible To Do This ?

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

  • Is It Possible To Do This ?

    Hi ALL,

    Does anyone know if it is possible to create a single study that extracts/gets results from another study ACTING on a particular Symbol.

    E.g. I would like to get an alert when MACD for BOTH the Dow and Snp are crossing.

    Thankx.

    Raje

  • #2
    Hello Raje,

    This is possible. Please visit this post to see an example of an EFS formula that will give you the MACD outputs of a secondary symbol. You could modify the formula and add the MACD object for your chart symbol so you can check for the crossing of both symbols from the same formula. An important note to point out about the formula listed in the above post is that it calculates the MACD outputs using simple moving averages. The built-in MACD study object uses exponential moving averages. If you want to, you could modify your formula to incorporate the EMA. Here is an example formula that will show you how to add the EMA calculation (EMAcalc.efs ).

    Another option, which is less efficient but might be easier to code, would involve two formulas running in separate charts on your two symbols. Formula 1 would use the setGlobalValue() function to store the data needed by Formula 2 running in your other chart. Formula 2 would use the getGlobalValue() function to access that data. You can find more info on these functions in our EFS Help Center & Library.
    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

    Working...
    X