CurrentBid (Function)

image\trumpet2.gif Disclaimer

The CurrentBid function returns the real-time inside Bid for the current bar.

Syntax

CurrentBid

Returns (Double)

A numeric real-time Bid value for the current bar.  The function returns the Close of the bar for all historical bars.

Parameters

None

Remarks

CurrentBid cannot reference historical Bid data, and returns the Close of the bar for all historical bars. 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 CurrentBid is used, the results are not based on Bid data for each bar, but on the Close of each bar.

Examples

Assigns the real-time inside CurrentBid to Value1, and then places a Limit order at that price.

Value1 = CurrentBid;

Buy next bar at Value1 + .01 Limit;

Assigns the real-time inside CurrentBid to Value1, and then compares that to the last trade price.

Value1 = CurrentBid;

If Value1 = Close then

Sell next bar at Value1 Stop;