YOUSEFUL / DELPHI / COMPONENTS

TAtlasBar

One price bar: time, open, high, low, close and volume.

Record Unit Atlas.FinData · Product Atlas Fin

Description

The record TAtlasBarSeries.Bars[I] returns. It is a copy: changing its fields does not change the series. Use TAtlasBarSeries.UpdateLast to change the newest bar.

Members

MemberKindWhat it does
TimefieldThe bar's time.
OpenfieldThe first price of the bar.
HighfieldThe highest price; never below Open, Close or Low in a series.
LowfieldThe lowest price; never above Open or Close in a series.
ClosefieldThe last price of the bar; the input of every indicator.
VolumefieldThe traded volume, zero or more; 0 when not given.
RisingmethodTrue when Close >= Open.

Methods

Rising method

function Rising: Boolean;

True when Close >= Open. A flat bar counts as rising and is drawn in UpColor.

Fields

Time field

Time: TDateTime;

The bar's time. The chart treats a bar with a zero time of day as daily (headers show the date only).

Open field

Open, High, Low, Close, Volume: Double;

The first price of the bar.

High field

Open, High, Low, Close, Volume: Double;

The highest price; never below Open, Close or Low in a series.

Low field

Open, High, Low, Close, Volume: Double;

The lowest price; never above Open or Close in a series.

Close field

Open, High, Low, Close, Volume: Double;

The last price of the bar; the input of every indicator.

Volume field

Open, High, Low, Close, Volume: Double;

The traded volume, zero or more; 0 when not given.

Examples

Count rising days

Reads every bar of a series and counts those that closed at or above their open.

pascal
uses Atlas.FinData;

function RisingBars(Data: TAtlasBarSeries): Integer;
var
  I: Integer;
begin
  Result := 0;
  for I := 0 to Data.Count - 1 do
    if Data[I].Rising then Inc(Result);
end;

TAtlasBarSeries

Also in Atlas Fin

TAtlasFinChart