Announcement

Collapse
No announcement yet.

Problem using dsUtilities

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

  • Problem using dsUtilities

    I'm trying to use one of the dsUtilities.efsLib functions - (dsDrawDnArrow) as described in the help file. I copied the example in the help file and saved it as an efs file. When it is applied to a chart, instead of arrows being displayed at swing highs as I expected there is an empty indicator section at the bottom of the chart. I've saved the dsUtilities.efsLib in the FunctionLibrary folder. I tried the same approach using different functions from the dsUtilities library with the same results. I've searched the forums for examples but have been unable to find any. If anyone sees the error in my ways thanks in advance.

    Also, when I tried to copy the following code into a PHP box I found that I could only copy 1 line. Is there a trick?

    PHP Code:
    var myLib addLibrary"dsUtilities.efsLib" );
    function 
    main() {
      var 
    myVar;
      
    myVar myLib.dsSwingHighBar13050 );
      if ( 
    getBarState() == BARSTATE_NEWBAR ) { 
       
    myVar myLib.dsSwingHighBar13, -1);
      if ( 
    myVar != null ){
        
    my.lib.dsDrawDnArrowmyvarColor.red12);
      }
     }


  • #2
    ramckay
    If you want the study to draw the swings in the price chart you need to add a preMain() function where you set the study to plot as a price study using the setPriceStudy(true) statement
    With regards to the script you posted there are a couple of syntax errors in the following line of code
    PHP Code:
    my.lib.dsDrawDnArrowmyvarColor.red12); 
    which should be
    PHP Code:
    myLib.dsDrawDnArrowmyVarColor.red12); 
    Once you make these changes the arrows should draw in the price chart
    Alex


    Originally posted by ramckay
    I'm trying to use one of the dsUtilities.efsLib functions - (dsDrawDnArrow) as described in the help file. I copied the example in the help file and saved it as an efs file. When it is applied to a chart, instead of arrows being displayed at swing highs as I expected there is an empty indicator section at the bottom of the chart. I've saved the dsUtilities.efsLib in the FunctionLibrary folder. I tried the same approach using different functions from the dsUtilities library with the same results. I've searched the forums for examples but have been unable to find any. If anyone sees the error in my ways thanks in advance.

    Also, when I tried to copy the following code into a PHP box I found that I could only copy 1 line. Is there a trick?

    PHP Code:
    var myLib addLibrary"dsUtilities.efsLib" );
    function 
    main() {
      var 
    myVar;
      
    myVar myLib.dsSwingHighBar13050 );
      if ( 
    getBarState() == BARSTATE_NEWBAR ) { 
       
    myVar myLib.dsSwingHighBar13, -1);
      if ( 
    myVar != null ){
        
    my.lib.dsDrawDnArrowmyvarColor.red12);
      }
     }

    Comment


    • #3
      Alex,

      I added a preMain() function and a setPriceStudy(true) line. Still get the same result - an empty indicator window with no arrows on the chart. What else could I be doing incorrectly? Probably simple because I'm a real newbie with eSignal.

      Also, is there any way to copy several lines of code and enter them into a PHP box so that I can display what I've written. Could only get one line of copied code to transfer into PHP box even when I'd selected several. Better yet, is there a place where detailed instructions are given showing how to enter information into the forum?

      Thanks so much,
      Rod

      Comment


      • #4
        Rod
        After you edited the script did you remove the efs from the chart and then load it again?
        Note that changes to setPriceStudy() will not take effect after an indicator has already been loaded in the chart
        Alex


        Originally posted by ramckay
        Alex,

        I added a preMain() function and a setPriceStudy(true) line. Still get the same result - an empty indicator window with no arrows on the chart. What else could I be doing incorrectly? Probably simple because I'm a real newbie with eSignal.

        Also, is there any way to copy several lines of code and enter them into a PHP box so that I can display what I've written. Could only get one line of copied code to transfer into PHP box even when I'd selected several. Better yet, is there a place where detailed instructions are given showing how to enter information into the forum?

        Thanks so much,
        Rod

        Comment


        • #5
          Rod
          At my end [using either IE6 or IE7] I just copy and paste the contents inside the PHP tags without any problems (see enclosed animation captured while writing this post)
          Alex

          PHP Code:
          var myLib addLibrary"dsUtilities.efsLib" );
          function 
          main() {
            var 
          myVar;
            
          myVar myLib.dsSwingHighBar13050 );
            if ( 
          getBarState() == BARSTATE_NEWBAR ) { 
             
          myVar myLib.dsSwingHighBar13, -1);
            if ( 
          myVar != null ){
              
          my.lib.dsDrawDnArrowmyvarColor.red12);
            }
           }




          Originally posted by ramckay
          Alex,

          I added a preMain() function and a setPriceStudy(true) line. Still get the same result - an empty indicator window with no arrows on the chart. What else could I be doing incorrectly? Probably simple because I'm a real newbie with eSignal.

          Also, is there any way to copy several lines of code and enter them into a PHP box so that I can display what I've written. Could only get one line of copied code to transfer into PHP box even when I'd selected several. Better yet, is there a place where detailed instructions are given showing how to enter information into the forum?

          Thanks so much,
          Rod

          Comment


          • #6
            Thanks so much Alex.

            I forgot to save the corrections after the changes!

            The demo is great, but when I try it the list of choices that I get are:
            Back
            Forward (grayed out)
            Print
            Refresh

            not the Copy
            Cut
            Paste
            etc.
            that are in the demo.

            Rod

            Comment


            • #7
              Rod
              It sounds like you may be using the browser included in the eSignal application which [for reasons I do not know] does not provide the Copy and Paste commands. I would suggest using a stand-alone browser such as IE, Firefox, etc
              Alex


              Originally posted by ramckay
              Thanks so much Alex.

              I forgot to save the corrections after the changes!

              The demo is great, but when I try it the list of choices that I get are:
              Back
              Forward (grayed out)
              Print
              Refresh

              not the Copy
              Cut
              Paste
              etc.
              that are in the demo.

              Rod

              Comment


              • #8
                That works like a champ.

                Thanks again Alex. You're great!

                Rod

                Comment


                • #9
                  Rod
                  You are most welcome and thank you for the kind words
                  Alex


                  Originally posted by ramckay
                  That works like a champ.

                  Thanks again Alex. You're great!

                  Rod

                  Comment

                  Working...
                  X