Overbasic – Data functions

My.Data category contains all built-in functions available in Overbasic for accessing data series.

Close #

Returns the close of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of close prices, depending on the context in which the function is used.

Result type: a numeric array or a number depending on the context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bar close:
Dim d As Numeric = My.Data.Close
'Returns the close of 2 bars back the current bar:
Dim d As Numeric = My.Data.Close(-2)

'In this context, it returns the entire array of close prices which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.Close, 10)

CurrentBar #

Returns current bar index.

Result type: an integer

Dim d As Numeric = My.Data.CurrentBar

Date #

Returns the date of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of dates, depending on the context in which the function is used.

Result type: a numeric array or a number depending on context in YYYYMMDD format (where YYYY = year; MM = month; DD = day).

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bar date:
Dim d As Numeric = My.Data.Date
'Returns the date of 2 bars back the current bar:
Dim d As Numeric = My.Data.Date(-2)

'In this context, it returns the entire array of dates:
Dim a As Numeric() = My.Data.Date

DBexp #

Refer HERE for documentation.

DownTicks #

Returns down-ticks of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of down-ticks, depending on the context in which the function is used.

Result type: a numeric array or a number depending on context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns down-ticks of current bar:
Dim d As Numeric = My.Data.DownTicks
'Returns down-ticks of 2 bars back the current bar:
Dim d As Numeric = My.Data.DownTicks(-2)

'In this context, it returns the entire array of down-ticks which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.DownTicks, 10)

DownVolume #

Returns the total volume of down-ticks in the current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of down-volumes, depending on the context in which the function is used.

Result type: a numeric array or a number depending on context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns down-volume of current bar:
Dim d As Numeric = My.Data.DownVolume
'Returns down-volume of 2 bars back the current bar:
Dim d As Numeric = My.Data.DownVolume(-2)

'In this context, it returns the entire array of down-volumes which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.DownVolume, 10)

High #

Returns the high of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of high prices, depending on the context in which the function is used.

Result type: a numeric array or a number depending on the context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bar high:
Dim d As Numeric = My.Data.High
'Returns the high of 2 bars back the current bar:
Dim d As Numeric = My.Data.High(-2)

'In this context, it returns the entire array of high prices which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.High, 10)

Low #

Returns the low of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of low prices, depending on the context in which the function is used.

Result type: a numeric array or a number depending on the context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bar low:
Dim d As Numeric = My.Data.Low
'Returns the low of 2 bars back the current bar:
Dim d As Numeric = My.Data.Low(-2)

'In this context, it returns the entire array of low prices which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.Low, 10)

Median #

Returns the Median = [(High + Low) / 2] of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of Median prices, depending on the context in which the function is used.

Result type: a numeric array or a number depending on the context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bar Median:
Dim d As Numeric = My.Data.Median
'Returns the Median of 2 bars back the current bar:
Dim d As Numeric = My.Data.Median(-2)

'In this context, it returns the entire array of median prices which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.Median, 10)

Open #

Returns the open of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of open prices, depending on the context in which the function is used.

Result type: a numeric array or a number depending on the context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bar open:
Dim d As Numeric = My.Data.Open
'Returns the open of 2 bars back the current bar:
Dim d As Numeric = My.Data.Open(-2)

'In this context, it returns the entire array of open prices which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.Open, 10)

OpenInt #

Returns the Open-Interest of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of Open-Interests, depending on the context in which the function is used.

Result type: a numeric array or a number depending on the context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bar Open-Interest:
Dim d As Numeric = My.Data.OpenInt
'Returns the Open-Interest of 2 bars back the current bar:
Dim d As Numeric = My.Data.OpenInt(-2)

'In this context, it returns the entire array of Open-Interests which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.OpenInt, 10)

Ticks #

Returns ticks of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of ticks, depending on the context in which the function is used.

Result type: a numeric array or a number depending on the context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bars ticks:
Dim d As Numeric = My.Data.Ticks
'Returns ticks of 2 bars back the current bar:
Dim d As Numeric = My.Data.Ticks(-2)

'In this context, it returns the entire array of ticks which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.Ticks, 10)

Time #

Returns the time of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole time array, depending on the context in which the function is used.

Result type: a numeric array or a number depending on context in HHMMSSFFFCCCN format (where HH = hours; MM = minutes; SS = seconds; FFF = milliseconds; CCC = microseconds; N = nanoseconds (hundreds).

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bar time:
Dim d As Numeric = My.Data.Time
'Returns the time of 2 bars back the current bar:
Dim d As Numeric = My.Data.Time(-2)

'In this context, it returns the entire time array:
Dim a As Numeric() = My.Data.Time

TotBar #

Returns the last bar index.

Result type: an integer

Dim d As Numeric = My.Data.TotBar

Typical #

Returns the Typical = [(High + Low + Close) / 3] of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of Typical prices, depending on the context in which the function is used.

Result type: a numeric array or a number depending on the context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bar Typical:
Dim d As Numeric = My.Data.Typical
'Returns the Typical of 2 bars back the current bar:
Dim d As Numeric = My.Data.Typical(-2)

'In this context, it returns the entire array of Typical prices which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.Typical, 10)

UnchangedTicks #

Returns unchanged-ticks of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of unchanged-ticks, depending on the context in which the function is used.

Result type: a numeric array or a number depending on context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns unchanged-ticks of current bar:
Dim d As Numeric = My.Data.UnchangedTicks
'Returns unchanged-ticks of 2 bars back the current bar:
Dim d As Numeric = My.Data.UnchangedTicks(-2)

'In this context, it returns the entire array of unchanged-ticks which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.UnchangedTicks, 10)

UnchangedVolume #

Returns the total volume of unchanged-ticks in the current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of unchanged-volumes, depending on the context in which the function is used.

Result type: a numeric array or a number depending on context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bar unchanged-volume:
Dim d As Numeric = My.Data.UnchangedVolume
'Returns the unchanged-volume of 2 bars back the current bar:
Dim d As Numeric = My.Data.UnchangedVolume(-2)

'In this context, it returns the entire array of unchanged-volumes which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.UnchangedVolume, 10)

UpTicks #

Returns up-ticks of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of up-ticks, depending on the context in which the function is used.

Result type: a numeric array or a number depending on context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns up-ticks of current bar:
Dim d As Numeric = My.Data.UpTicks
'Returns up-ticks of 2 bars back the current bar:
Dim d As Numeric = My.Data.UpTicks(-2)

'In this context, it returns the entire array of up-ticks which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.UpTicks, 10)

UpVolume #

Returns the total volume of up-ticks in the current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of up-volumes, depending on the context in which the function is used.

Result type: a numeric array or a number depending on context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bar up-volume:
Dim d As Numeric = My.Data.UpVolume
'Returns the up-volume of 2 bars back the current bar:
Dim d As Numeric = My.Data.UpVolume(-2)

'In this context, it returns the entire array of up-volumes which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.UpVolume, 10)

Value #

Returns the value of the array passed as an argument in the current bar (or in the bar obtained by adding the OFFSET argument to the current bar).

Result type: numeric

Arguments:

  • ARRAY EXPRESSION: any data function (e.g. Open, High, Low, Close, Volume), indicator, array type variable (or function).
  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns ARRAY EXPRESSION value of 2 bars back the current bar:
Dim d As Numeric = My.Data.Value(Mov(Close, 10), -2)

ValueByBar #

Returns the value of the array passed as an argument in the specified bar.

Result type: numeric

Arguments:

  • ARRAY EXPRESSION: any data function (e.g. Open, High, Low, Close, Volume), indicator, array type variable (or function).
  • BAR: bar index.
'Returns ARRAY EXPRESSION value in bar 10:
Dim d As Numeric = My.Data.ValueByBar(Mov(Close, 21), 10)

ValueByDate #

Returns the value of the array passed as an argument in the specified date/time.

Result type: numeric

Arguments:

  • ARRAY EXPRESSION: any data function (e.g. Open, High, Low, Close, Volume), indicator, array type variable (or function).
  • DATE: a date in YYYYMMDD format (where YYYY = year; MM = month; DD = day)
  • TIME: a time in HHMMSSFFFCCCN format (where HH = hours; MM = minutes; SS = seconds; FFF = milliseconds; CCC = microseconds; N = nanoseconds (hundreds)
'Returns ARRAY EXPRESSION value in the specified date/time:
Dim d As Numeric = My.Data.ValueByDate(Mov(Close, 21), 20230315, 1256542509780)

Volume #

Returns the volume of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of volumes, depending on the context in which the function is used.

Result type: a numeric array or a number depending on the context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bar volume:
Dim d As Numeric = My.Data.UpVolume
'Returns the volume of 2 bars back the current bar:
Dim d As Numeric = My.Data.UpVolume(-2)

'In this context, it returns the entire array of volumes which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.Volume, 10)

Weighted #

Returns the Weighted = [(Open + High + Low + Close) / 4] of current bar (or the bar obtained by adding the OFFSET argument to current bar) or the whole array of Weighted prices, depending on the context in which the function is used.

Result type: a numeric array or a number depending on the context.

Arguments:

  • OFFSET: (optional) difference (in bars) between current bar and the bar containing the data to get. Eg. To get data of 2 bars back the current bar, set OFFSET equal to -2.
'Returns current bar Weighted:
Dim d As Numeric = My.Data.Weighted
'Returns the Weighted of 2 bars back the current bar:
Dim d As Numeric = My.Data.Weighted(-2)

'In this context, it returns the entire array of Weighted prices which is passed to Mov function for calculating the moving average:
Dim MM As Numeric = Mov(My.Data.Weighted, 10)