Announcement

Collapse
No announcement yet.

Parameters are not showing up in edit window

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

  • Parameters are not showing up in edit window

    Hello,
    I have successfully written a few efs' but this time my single paremeter is not showing up in the Edit Studies window. Nothing I do seems to display my parameters. Is there something else I need to do? Perhaps there is some eSignal efs caching going on that I need to be aware of. Do I have a global paremeter problem with other efs'? My code is as follows:

    var aFPArray = new Array();

    function preMain() {
    var x=0;

    setPriceStudy(true);
    setStudyTitle("Trend");

    aFPArray[x] = new FunctionParameter("useMidpoint", FunctionParameter.BOOLEAN);
    with (aFPArray[x] ) {
    setName("Use Midpoint");
    addOption("True");
    addOption("False");
    setDefault(false);
    }
    setComputeOnClose(true);
    }

    function main(useMidpoint) {
    var y;

    y = useMidpoint;
    }

  • #2
    stock42,

    If you use Reload efs it won't show new parameters you add.

    You have to remove the efs from the chart, and then add it back on.

    In your example, I would leave the addOption calls off for boolean values. eSignal will give you the true/false choice.

    Other than that, your code looks fine.

    Steve

    Comment


    • #3
      On your suggestion I removed the addOptions() call from the efs and removed the efs from my chart, added it from the Wizard directory, and still no parameters showing up in the edit window.

      I have been wrestling with this for a number of hours and haven't come up with the solution yet. I did restart eSignal and that didn't help although I haven't tried to restart with a clean chart and then add my study.

      Anything else I should try?

      Comment


      • #4
        Hello stock42,

        The following code is working properly. The addOption calls are commented out as Steve suggested. Give this a try.

        PHP Code:

        var aFPArray = new Array();

        function 
        preMain() {
            var 
        x=0;
            
            
        setPriceStudy(true);
            
        setStudyTitle("Trend");
            
            
        aFPArray[x] = new FunctionParameter("useMidpoint"FunctionParameter.BOOLEAN); 
            
        with (aFPArray[x] ) { 
                
        setName("Use Midpoint"); 
                
        //addOption("True"); 
                //addOption("False"); 
                
        setDefault(false);
            } 
            
        setComputeOnClose(true);
        }

        function 
        main(useMidpoint) {
            var 
        y;

            
        useMidpoint;

        Here's what the formula parameter looks like in the Edit Studies dialog.



        Are you selecting the study from the "Study" drop-down box at the top of this window?
        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 for checking. It is good to know that the code works on someone's system.

          When I add this study to my charts I do not see the parameters that you do when I look at the edit window. Is there some sort of force update or master reset that one can do to the charts to force an initialization? Short of this it looks like my charts have some sort of corruption that is short circuiting the auto initialization of this specific efs. The strange thing is that even when I start with a new chart my parameters don't appear. I'll keep looking.

          Comment


          • #6
            As Jason mentioned, you have to select your study from the drop down list box at the top of the edit studies dialog box.

            The default is to show the chart parameters. It will only show your study directly if you select your study on the chart and then pick Edit...

            If you just pick Edit... it will show the chart parameters and you have to select your study manually from the "Study" drop down box.

            Steve

            Comment

            Working...
            X