ATAS.Indicators
ATAS.Indicators.Indicator Class Referenceabstract

Базовый класс для индикаторов More...

Inheritance diagram for ATAS.Indicators.Indicator:

Public Member Functions

void Dispose ()
 
override string ToString ()
 

Public Attributes

int CurrentBar => SourceDataSeries.Count
 Bar number. All the bars and the values of the corresponding data series have a serial number. The earliest bar of the chart is assigned the number 0; the next bar is assigned the number 1 and so on. More...
 
string Instrument => _dataProvider.Instrument
 Instrument name More...
 
string ChartType => _dataProvider.ChartType
 Chart type More...
 
string TimeFrame => _dataProvider.TimeFrame
 Timeframe. More...
 
string DataPath => _dataProvider.DataPath
 Path to the working program folder More...
 

Protected Member Functions

void Add (Indicator indicator)
 
 Indicator (bool useCandles=false)
 
DrawingText AddText (string tag, string text, bool isAbovePrice, int bar, int price, int yOffset, int xOffset, Color textcolor, Color outlinecolor, Color fillcolor, float fontSize, DrawingText.TextAlign align)
 Add text label to chart More...
 
void AddAlert (string soundFile, string instrument, string message, System.Windows.Media.Color background, System.Windows.Media.Color foreground)
 Add alert More...
 
bool IsNewSession (int bar)
 Function returns new session flag More...
 
bool IsNewWeek (int bar)
 Function returns new week flag More...
 
bool IsNewMonth (int bar)
 Function returns new month flag More...
 
IndicatorCandle GetCandle (int bar)
 Function returns Candle for specifyed bar More...
 
abstract void OnCalculate (int bar, decimal value)
 Indicator calculation More...
 
virtual void NewTick (MarketDataArg arg)
 New tick More...
 
virtual void DepthChanged (MarketDataArg arg)
 Depth changing More...
 
virtual void CumulativeTrade (CumulativeTrade arg)
 Cumulative trade More...
 
virtual void OnSourceChanged ()
 
virtual void OnRecalculate ()
 
virtual void OnFinishRecalculate ()
 
Bitmap GetScreenshot ()
 Function returns screenshot of chart More...
 
void RaisePropertyChanged (string propertyName)
 
void RedrawChart ()
 Call to redraw chart More...
 
virtual void OnDispose ()
 

Protected Attributes

decimal TickSize => DataProvider?.TickSize ?? 0m
 TickSize More...
 
decimal CumulativeDomAsks => DataProvider?.CumulativeDomAsks ?? 0m
 Cumulative dom asks volume More...
 
decimal CumulativeDomBids => DataProvider?.CumulativeDomBids ?? 0m
 Cumulative dom bids volume More...
 
string StringFormat => DataProvider != null ? DataProvider.StringFormat : ""
 Price format More...
 

Properties

List< TrendLine > TrendLines = new List<TrendLine>() [get]
 Trendlines More...
 
Dictionary< string, DrawingText > Labels = new Dictionary<string, DrawingText>() [get, set]
 
IndicatorDataProvider DataProvider [get, set]
 
IDataSeries SourceDataSeries [get, set]
 
List< IDataSeriesDataSeries [get]
 Dataseries list More...
 
List< LineSeriesLineSeries [get]
 Price levels More...
 
string Name [get, set]
 Name of Indicator More...
 
bool ShowDescription [get, set]
 
string Panel [get, set]
 
bool UseCandles [get]
 
decimal this[int index] [get, protected set]
 

Events

PropertyChangedEventHandler PropertyChanged
 

Detailed Description

Базовый класс для индикаторов

Member Function Documentation

◆ AddAlert()

void ATAS.Indicators.Indicator.AddAlert ( string  soundFile,
string  instrument,
string  message,
System.Windows.Media.Color  background,
System.Windows.Media.Color  foreground 
)
inlineprotected

Add alert

Parameters
soundFile
instrument
message
background
foreground

◆ AddText()

DrawingText ATAS.Indicators.Indicator.AddText ( string  tag,
string  text,
bool  isAbovePrice,
int  bar,
int  price,
int  yOffset,
int  xOffset,
Color  textcolor,
Color  outlinecolor,
Color  fillcolor,
float  fontSize,
DrawingText.TextAlign  align 
)
inlineprotected

Add text label to chart

Parameters
tag
text
isAbovePrice
bar
price
yOffset
xOffset
textcolor
outlinecolor
fillcolor
fontSize
align
Returns

◆ CumulativeTrade()

virtual void ATAS.Indicators.Indicator.CumulativeTrade ( CumulativeTrade  arg)
inlineprotectedvirtual

Cumulative trade

Parameters
arg

◆ DepthChanged()

virtual void ATAS.Indicators.Indicator.DepthChanged ( MarketDataArg  arg)
inlineprotectedvirtual

Depth changing

Parameters
argChanged depth level

◆ GetCandle()

IndicatorCandle ATAS.Indicators.Indicator.GetCandle ( int  bar)
inlineprotected

Function returns Candle for specifyed bar

Parameters
barbar number
Returns
Cadle

◆ GetScreenshot()

Bitmap ATAS.Indicators.Indicator.GetScreenshot ( )
inlineprotected

Function returns screenshot of chart

Returns
Bitmap of chart

◆ IsNewMonth()

bool ATAS.Indicators.Indicator.IsNewMonth ( int  bar)
inlineprotected

Function returns new month flag

Parameters
barBar number
Returns

◆ IsNewSession()

bool ATAS.Indicators.Indicator.IsNewSession ( int  bar)
inlineprotected

Function returns new session flag

Parameters
barBar number
Returns

◆ IsNewWeek()

bool ATAS.Indicators.Indicator.IsNewWeek ( int  bar)
inlineprotected

Function returns new week flag

Parameters
barBar number
Returns

◆ NewTick()

virtual void ATAS.Indicators.Indicator.NewTick ( MarketDataArg  arg)
inlineprotectedvirtual

New tick

Parameters
argTick

◆ OnCalculate()

abstract void ATAS.Indicators.Indicator.OnCalculate ( int  bar,
decimal  value 
)
protectedpure virtual

Indicator calculation

Parameters
barBar number
valueInput dataseries value

◆ RedrawChart()

void ATAS.Indicators.Indicator.RedrawChart ( )
inlineprotected

Call to redraw chart

Member Data Documentation

◆ ChartType

string ATAS.Indicators.Indicator.ChartType => _dataProvider.ChartType

Chart type

◆ CumulativeDomAsks

decimal ATAS.Indicators.Indicator.CumulativeDomAsks => DataProvider?.CumulativeDomAsks ?? 0m
protected

Cumulative dom asks volume

◆ CumulativeDomBids

decimal ATAS.Indicators.Indicator.CumulativeDomBids => DataProvider?.CumulativeDomBids ?? 0m
protected

Cumulative dom bids volume

◆ CurrentBar

int ATAS.Indicators.Indicator.CurrentBar => SourceDataSeries.Count

Bar number. All the bars and the values of the corresponding data series have a serial number. The earliest bar of the chart is assigned the number 0; the next bar is assigned the number 1 and so on.

◆ DataPath

string ATAS.Indicators.Indicator.DataPath => _dataProvider.DataPath

Path to the working program folder

◆ Instrument

string ATAS.Indicators.Indicator.Instrument => _dataProvider.Instrument

Instrument name

◆ StringFormat

string ATAS.Indicators.Indicator.StringFormat => DataProvider != null ? DataProvider.StringFormat : ""
protected

Price format

◆ TickSize

decimal ATAS.Indicators.Indicator.TickSize => DataProvider?.TickSize ?? 0m
protected

TickSize

◆ TimeFrame

string ATAS.Indicators.Indicator.TimeFrame => _dataProvider.TimeFrame

Timeframe.

Property Documentation

◆ DataSeries

List<IDataSeries> ATAS.Indicators.Indicator.DataSeries
get

Dataseries list

◆ LineSeries

List<LineSeries> ATAS.Indicators.Indicator.LineSeries
get

Price levels

◆ Name

string ATAS.Indicators.Indicator.Name
getset

Name of Indicator

◆ TrendLines

List<TrendLine> ATAS.Indicators.Indicator.TrendLines = new List<TrendLine>()
get

Trendlines