onLButtonDblClk()

ICE Data Services -

onLButtonDblClk() Mouse Functions

A user-defined function that executes when the left mouse button is double clicked.

 

Syntax

function onLButtonDblClk( [ nBarIndex ][, nYValue ][, nXPixel ][, nYPixel ] ) {

}  

 Parameters

Parameter: Description: Default:
nBarIndex [Optional]  Bar Index on mouse event. n/a
nYValue [Optional]  Price value (or Y-axis) on mouse event. n/a
nXPixel [Optional]  X-axis pixel coordinate from top left corner of study window on mouse event (7.9.1 and later). n/a
nYPixel [Optional]  Y-axis pixel coordinate from top left corner of study window on mouse event (7.9.1 and later) . n/a


Return Value(s)

N/A

 

Notes

The optional parameters listed above are used to pass the corresponding data to the onLButtonDblClk() user-defined function.  This function must be added to the formula outside of main() as in the following code example.

The nXPixel and nYPixel parameters on only available in version 7.9.1 and later.

Be aware that onLButtonDown() and onLButtonUp() also get called on the left double-click event.

Starting with version 11.1 all mouse functions require the use of the Shift key when called from the chart. This change was done to avoid conflicts between EFS and chart mouse events (such as right clicking or double clicking) without compromising any backwards compatibility.

Code Examples

7.9.1 or later
function main() {

}

function onLButtonDblClkbarIndex, yValue, x, y) {
   debugPrintln("LeftDblClk: " + barIndex + ", " + yValue + "  x: " 
        + x + "  y: " + y);
   var text = "Double Clicked bar " + barIndex + " at " + yValue.toFixed(2) 
        + "  x: " + x + "  y: " + y;
   drawTextAbsolute(5, 35, text, Color.white, Color.navy, 
        Text.RELATIVETOLEFT|Text.RELATIVETOBOTTOM|Text.BOLD,
        null, 14, "DblClickInfo");
}
7.9 or earlier
function main() {

}

function onLButtonDblClkbarIndex, yValue) {
   debugPrintln("LeftDblClk: " + barIndex + ", " + yValue );
   var text = "Double Clicked bar " + barIndex + " at " + yValue.toFixed(2);
   drawTextAbsolute(5, 35, text, Color.white, Color.navy, 
        Text.RELATIVETOLEFT|Text.RELATIVETOBOTTOM|Text.BOLD,
        null, 14, "DblClickInfo");
}


See Also

Mouse Functions
eSignal Bulletin Board Search Engine
Help Guides and Tutorials