CurrentAsk (Function)
The CurrentAsk function returns the real-time inside Ask for the current bar.
Syntax
CurrentAsk
Returns (Double)
A numeric real-time Ask value for the current bar. The function returns the Close of the bar for all historical bars.
Parameters
None
Remarks
CurrentAsk cannot reference historical Ask data, and returns the Close of the bar for all historical bars in a chart. Keep in mind that symbols that do not trade directly will report 0; (e.g. Market Index Symbols).
If you historically back-test a Strategy where CurrentAsk is used, the results are not based on Ask data for each bar, but on the Close of each bar.
Examples
Assigns the real-time inside CurrentAsk to Value1, and then places a Limit order at that price.
Value1 = CurrentAsk;
Buy next bar at Value1 - .02 Limit;
Assigns the real-time inside CurrentAsk to Value1, and then compares that to the last trade price.
Value1 = CurrentAsk;
If Value1 = Close then
Sell next bar at Value1 Stop;