Announcement

Collapse
No announcement yet.

EFS vs. EFS2..

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

  • EFS vs. EFS2..

    I just noticed something working on a clients code.. We were getting different results and I identified what I think might be an issue...

    In this example, I've loaded the BASIC STUDIES MACD and the EFS 2 CUSTOM MACD on the same chart with the same settings (as best as I can tell)..

    Now, look at the results on the selected bar..

    BASIC STUDY:
    MACD = -0.001
    MACD SIG = -0.003
    MACD HIS = 0.001

    EFS2
    MACD = -0.001
    MACD SIG = -0.001
    MACD HIS = -0.001

    Now, what am I missing here?? What is the difference and are there other differences in other EFS2 indicators?? The EFS2 documentation does not include anything to show me I need to pass a unique value/parameter to the macd().

    I'm confused????
    Attached Files
    Brad Matheny
    eSignal Solution Provider since 2000

  • #2
    Hello Brad,

    The EFS2 built-in is based on exponential moving averages. The MACD study from the Basic menu has the option to do simple or exponential. It is set to simple by default.

    For the Basic MACD, go into Edit Studies and uncheck the simple moving average option and it will match the EFS2 study.



    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
      cool

      Jason,

      Cool, thanks.. How do I get the EFS 2 to match the BASIC MACD?
      Brad Matheny
      eSignal Solution Provider since 2000

      Comment


      • #4
        Hello Brad,

        At this time the EFS2 study does not have a simple moving average option. You could use the old EFS1 study. Or, if you need it in the form of a Series object then you could wrap it inside an efsInternal() call.

        PHP Code:
        var xMACD null;

        function 
        main() {
            if (
        xMACD == null) {  // initialize only once at start up
                
        xMACD efsInternal("simpleMACD");
            }
            
            var 
        nSig xMACD.getValue(0);
            if (
        nSig == null) return;
            
            return 
        nSig;
        }


        var 
        myMACD null;

        function 
        simpleMACD() {
            if (
        myMACD == nullmyMACD = new MACDStudy(12269"Close"truetrue);
            var 
        Signal myMACD.getValue(MACDStudy.SIGNAL0);
            if (
        Signal == null) return;
            
            return 
        Signal;

        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


        • #5
          Thanks buddy..

          Thanks Jason,

          I was kinda thinking I had to do it that way. Was hoping there was an easier fix... lol. You know, some "special parameter" or something..

          Oh well, back to coding..

          B
          Brad Matheny
          eSignal Solution Provider since 2000

          Comment


          • #6
            You're most welcome.
            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