GetPriceType

GetPriceType ();

Description

Returns the price type selected for the current symbol: "Last", "Bid", "Ask", or "Mark". Note that the last three are supported by non-Forex symbols only on intraday charts with time interval not greater than 15 days; on all other charts this function will always return "Last" for non-Forex symbols.

Example

AddLabel(yes, "The " + GetPricetype() + " price type is selected");

This script adds a chart label showing which price type is currently selected.

You may also like
Globals
This area will only be displayed for studies that use the DefineGlobalColor function. In this ...
MomentumPercentDiff
The Momentum Percent Diff is a momentum-based technical indicator. Unlike the regular Momentum ...
Percentage View
Percentage view is a TOS feature that enables you to view price changes as percentage values. ...