Selected Value bar Plotting Confusion

I have written a code Using "Selected value".
Whenever i select a specific bar , it just plots Horizontal lines at it's High and Low.
What confuses me is if i wrongly or accidentally double click the plots wrong lines altogether.
so every time i make sure that i dummy click somewhere else and then select the bar i require actually.
In simple terms if i single click or double click a bar,Plotting lines value should not change.
Pls guide me if there is a way to overcome it..



Gloria Filamino

@Gloiria, I'm not sure, but I think that unfortunately there is no solution.

Double-click is internally used be AmiBroker to select "ranges" (as an alternative to F12, Shift+F12).

From the BeginValue() (or EndValue()) function doc:

To select the range you have to double-click in the chart at the beginning of the range and then double-click in the chart at the end of the range.

I did a short test and frequently after the double-click, the horizontal line gets its vertical position from the last bar (something that seems consistent with the value returned by EndValue() when no range is actually defined:

If no range is marked then the value at the last bar is returned.

Thanks for reply beppe.
Not just double click ,even if you click twice with decent intervals it just plots 2 different lines.
I am confused.