Announcement

Collapse
No announcement yet.

FibLines

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

  • FibLines

    Is it possible to do this?
    I have made this efs with fibvalues of pivots, and have problems with the bands. They act like MA's when price is moving. I would like them to stay constant, like the high(inv(60)) and low(inv(60)). Anyone knows if this is possible?
    Attached Files

  • #2
    finnhan
    For someone to be able to provide any guidance on your script you neeed to post a non-encrypted efs.
    If you instead wish to keep the efs proprietary then you will have to contact an EFS Consultant and have them develop it for you.
    Alex

    Comment


    • #3
      Sorry

      I'm sorry, I'll try again. I was hoping this could bee done with the drawLine function. New file attached.
      Attached Files

      Comment


      • #4
        Hello finnhan,

        The key is to create Series Objects for each of your custom pivot calculations, vR2, vR1, vRR, vPP, vS1 and vS2 by moving those calculations out to their own functions and initializing a set of new global variables through efsInternal() calls. Once they are in the form of Series Objects you can then use the .getValue() method with them. Currently you are attempting to use the getValue() method on vR2, which is just a number and not a series.

        Not sure why you want to draw them with drawLineRelative(). You certainly can, but I would recommend plotting them from the return statement in main() so that you can easily view their historical values.

        You'll also need to change the order in which they are initialized as vR2 requires the vPP series and vRR series for its calculation. Create a separate set of global variables for these series, such as xPP, xR2 etc and continue to use the vPP, vR2 variables for the .getValue(0) assignments. Initialize the new x variables inside your current bInit routine just after xHigh, xLow and xClose as you'll be passing those as parameters to the xPP efsInternal call, (i.e. xPP = efsInternal("calcPP", xHigh, xLow, xClose)) Give it a shot and if you run into any problems, post your updated code and we'll help you work through it.
        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
          Thank you

          Thank you Jason. I have done the changes, but i still dont get it. Hope i have done the right changes to the code, I dont get any errors so far, but it's still not working. I have posted the update, and hope i can get some more help with this.
          finnhan
          Attached Files

          Comment


          • #6
            Hello finnhan,

            You have not implemented the use of efsInternal() as previously suggested. The user-defined function that you need to create outside of main for your xPP series, which needs to be referenced by efsInternal(functionName [, parameters] [, sym/inv]) would look like the following for calcPP.

            PHP Code:
            // add after function main()

            function calcPP(xHxLxC) {
                return (
            xH.getValue(0) + xL.getValue(0) + xC.getValue(0)) / 3;


            Your initialization of xPP (as well as the rest of your series) inside your bInit routine needs to use efsInternal():

            PHP Code:
            if(bInit == false){
                
            xHigh  high(inv(30));
                
            xLow   low(inv(30));
                
            xClose close(inv(30));
                
            xPP    efsInternal("calcPP"xHighxLowxClose);
                
            bInit  true;

            Follow the same procedure for the other series you need to create.
            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


            • #7
              Thanks

              It's working. Thank you Jason

              Comment


              • #8
                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


                • #9
                  Hello finnhan

                  Do you mind posting your updated EFS?

                  Regards

                  Comment

                  Working...
                  X