onRButtonUp() Mouse Functions
A user-defined function that executes when the right mouse button is released.
Syntax
function onRButtonUp( [ 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 onRButtonUp() 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 onRButtonUp( barIndex, yValue, x, y) {
debugPrintln("RButton Up: " + barIndex + ", " + yValue + " x: "
+ x + " y: " + y);
var text = "Right Button Up " + 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, "ClickInfo");
}
function main() {
}
function onRButtonUp( barIndex, yValue) {
debugPrintln("RButton Up: " + barIndex + ", " + yValue );
var text = "Right Button Up " + barIndex + " at " + yValue.toFixed(2);
drawTextAbsolute(5, 35, text, Color.white, Color.navy,
Text.RELATIVETOLEFT|Text.RELATIVETOBOTTOM|Text.BOLD,
null, 14, "ClickInfo");
}
See Also
Mouse Functions
eSignal Bulletin Board Search Engine
Help Guides and Tutorials