Announcement

Collapse
No announcement yet.

BarIndex Command

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

  • BarIndex Command

    Hello all,

    We are using the "onLButtonDblClk" function with following parameters:

    barIndex and yValue

    As per the API documentation the yValue should provide the Price where the mouse is clicked...but it is always returning 0.

    Let me know if anyone has similar issue or any pointers on how to resolve this.

    Thank you.

  • #2
    I plan on adding mouse functions to one of my studies over the next few days. I'll post if I find any similar anomalies...

    Comment


    • #3
      The sample EFS code at Click Here works fine for me.

      Double-clicked price (yValue) and bar index correctly show up in the Formula Output Window (output of the debugPrintln() statements).

      Comment


      • #4
        Hi Spyder,

        You're getting a 0 because your study is running as a non-price study and is not plotting any series data to create a scale.

        Try the following code.

        PHP Code:
        function preMain() {
            
        setPriceStudy(true);
        }

        function 
        onLButtonDblClkbarIndexyValue) {
            
        debugPrintln("Index: " barIndex "  Price: " yValue);

        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
          Yup, now the BarIndex and yValue commands are working properly.
          Amazing what one or two lines of code can do.

          Thanks!

          Comment

          Working...
          X