Exploration / Indicators
|SYNTAX||SelectedValue( ARRAY )|
|FUNCTION||Retrieves array value at currently selected bar. Main purpose: commentary and interpreration code.|
|EXAMPLE||selectedvalue( close )|
tj --at-- amibroker.com
|SelectedValue(array) is a function that retrieves 'selected element' of the array.|
Since 'selection line' is available only for CHARTS. SelectedValue gives
the value of array at bar that is currently selected in chart by vertical line.
This is how it works in INDICATORS, INTERPRETATION and CHART COMMENTARY
(because they are relative to selected bar)
In AA window 'selected element' means THE LAST BAR of currently selected
analysis range. It is the last available bar for "all quotes" and "last n quotes" range.
It is the the bar corresponding to "End Date" when using "From-To" range.
So if you choose range: "all quotes" in AA
SelectedValue function is equivalent to
array[ BarCount - 1 ]
The SelectedValue function is used in the following formulas in AFL on-line library:
Updated on-line reference