onRButtonDblClk() Mouse Functions
A user-defined function that executes when the right mouse button is double clicked.
Syntax
function onRButtonDblClk( [ 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 onRButtonDblClk() 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 onRButtonDown() and onRButtonUp() also get called on the right 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
function main() {
}
function onRButtonDblClk( barIndex, yValue, x, y) {
debugPrintln("RightDblClk: " + 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");
}
function main() {
}
function onRButtonDblClk( barIndex, yValue) {
debugPrintln("RightDblClk: " + 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