Announcement

Collapse
No announcement yet.

efsInternal - Passing functions as parameters (split)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • efsInternal - Passing functions as parameters (split)

    While you are at it...

    Can functions be passed as input parameters?

    I want to pass a function to my study via the new FunctionParameter:


    var iColorFib = new FunctionParameter("iColorFib", FunctionParameter.COLOR);
    iColorFib.setDefault( Color.aqua );

    That's how I tell my study what color to use.

    I would like to be able to tell my study what function to use.

    THANKING YOU IN ADVANCE.

  • #2
    Hello Avery,

    I saw in one of your other threads that you had figured this out. If that is not the case, please let us know.
    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
      Well, yes and no.

      I can get it to work SOMETIMES.

      So far, for the builtin functions in the builtin folder that have LENGTH as Parm1 and SOURCE as Parm2.

      The other builtins don't seem to work.

      My goal is to be able to have ONE STUDY that accepts ANY external function and processes it.

      That way, I and my fellow traders, won't have to waste time coding, copy/pasting, etc...

      I am really stuck on this and SERIES. Once I get through the learning curve, I will really be able to code some useful studies.

      In the meantime, I am using the BRUTE FORCE method of coding. Just getting it going.

      Thanks.

      P.S. If you know of a way that if I select say the custom library, then all the functions in that library appear in a drop down box? That would be a HUGE help.


      Originally posted by JasonK
      Hello Avery,

      I saw in one of your other threads that you had figured this out. If that is not the case, please let us know.

      Comment


      • #4
        Hello Avery,

        Originally posted by buzzhorton
        Well, yes and no.

        I can get it to work SOMETIMES.

        So far, for the builtin functions in the builtin folder that have LENGTH as Parm1 and SOURCE as Parm2.

        The other builtins don't seem to work.

        My goal is to be able to have ONE STUDY that accepts ANY external function and processes it.

        That way, I and my fellow traders, won't have to waste time coding, copy/pasting, etc...

        I am really stuck on this and SERIES. Once I get through the learning curve, I will really be able to code some useful studies.

        In the meantime, I am using the BRUTE FORCE method of coding. Just getting it going.

        Thanks.
        I see that the solution I provided in your original thread where you posted the question initially, did the trick.
        Good deal.


        P.S. If you know of a way that if I select say the custom library, then all the functions in that library appear in a drop down box? That would be a HUGE help.
        I'm not sure this is possible to do programmatically. If we could enumerate through an objects methods, then it might be possible. I'll see if I can find anything along these lines.
        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