ATAS
|
Base class for custom indicators in a chart. More...
Public Member Functions | |
virtual void | Dispose () |
override string | ToString () |
Converts the current instance of the indicator to its string representation. | |
Public Member Functions inherited from ATAS.Indicators.ChartObject | |
virtual bool | ProcessMouseClick (RenderControlMouseEventArgs e) |
Processes a mouse click event on the chart object. | |
virtual bool | ProcessMouseWheel (int delta) |
Processes a mouse wheel event on the chart object. | |
virtual bool | ProcessMouseDown (RenderControlMouseEventArgs e) |
Processes a mouse down event on the chart object. | |
virtual bool | ProcessMouseUp (RenderControlMouseEventArgs e) |
Processes a mouse up event on the chart object. | |
virtual bool | ProcessMouseMove (RenderControlMouseEventArgs e) |
Processes a mouse move event on the chart object. | |
virtual bool | ProcessMouseDoubleClick (RenderControlMouseEventArgs e) |
Processes a mouse double click event on the chart object. | |
virtual StdCursor | GetCursor (RenderControlMouseEventArgs e) |
Gets the cursor to display when the mouse is over the chart object. | |
virtual bool | ProcessKeyDown (CrossKeyEventArgs e) |
Processes a key down event on the chart object. | |
virtual bool | ProcessKeyUp (CrossKeyEventArgs e) |
Processes a key up event on the chart object. | |
Protected Member Functions | |
BaseIndicator (bool useCandles=false) | |
virtual void | RecalculateValues () |
Recalculate the indicator values on each bar. | |
virtual void | OnInitialize () |
The method is executed before the first calculation. | |
virtual void | OnRecalculate () |
The method is executed before a new calculation. | |
virtual void | OnFinishRecalculate () |
The method is executed after the end of the calculation. | |
virtual void | Calculate (int bar, decimal value) |
Performs the calculation for the indicator at the specified bar and value. | |
abstract void | OnCalculate (int bar, decimal value) |
The main indicator calculation method is called for each bar on the history, then it is called on each tick. | |
void | Add (Indicator indicator) |
Adds an indicator to the list of used indicators by this indicator. | |
void | Clear () |
Clear all data series. | |
virtual void | OnSourceChanged () |
This method is called when the SourceDataSeries property is changed. | |
void | RaisePropertyChanged (string propertyName) |
Raises the PropertyChanged event for the specified property name. | |
void | RaisePropertyChanged (object sender, PropertyChangedEventArgs e) |
Raises the PropertyChanged event with the specified event arguments. | |
void | RaisePanelPropertyChanged (string name) |
Raises the PanelPropertyChanged event with the specified property name. | |
void | RaiseBarValueChanged (int bar) |
Raises the BarValueChanged event with the specified bar value. | |
virtual void | OnDispose () |
Called when the indicator is being disposed. | |
override void | OnVisibleChanged () |
Called when the Visible property changes. | |
Protected Member Functions inherited from ATAS.Indicators.ChartObject | |
virtual void | OnVisibleChanged () |
Called when the Visible property changes. | |
virtual void | LockedOnChanged () |
Called when the Locked property changes. | |
Protected Member Functions inherited from ATAS.Indicators.Filters.TrackedPropertyBase | |
void | SetProperty< TProperty > (ref TProperty store, TProperty value, Action onChanged=null, Func< TProperty, bool > onChanging=null, [CallerMemberName] string propertyName="") |
Sets the value of a property and notifies subscribers if the value has changed. | |
void | SetTrackedProperty< TProperty > (ref TProperty store, TProperty value, Action< string > onChanged=null, [CallerMemberName] string propertyName="") |
Sets the value of a property that implements the INotifyPropertyChanged interface and notifies subscribers if the value has changed. | |
virtual void | OnChangeProperty ([CallerMemberName] string propertyName="") |
Notifies subscribers when a property value changes. | |
Static Protected Member Functions | |
static PerfCounter | MeasurePerformance (string name) |
Measures the performance of a specific operation with the given name. If a performance diagnoser is available, it will be used to measure the performance; otherwise, a default performance counter will be returned. | |
Protected Attributes | |
readonly List< Indicator > | UsedIndicators = new() |
The list of indicators that are being used by this indicator. | |
Properties | |
static ? PerformanceDiagnoser | PerformanceDiagnoser [get] |
Indicator performance tracker. | |
static bool | UseProfiling [get, set] |
Set to true to measure the performance of all indicators. | |
string | Name [get, set] |
Name of the indicator. | |
bool | IsDisposed [get, set] |
Gets or sets a value indicating whether the indicator object has been disposed of. | |
List< IDataSeries > | DataSeries [get] |
List of data series used by the indicator. | |
List< LineSeries > | LineSeries [get] |
List of line series used by the indicator. | |
string | Panel [get, set] |
The name of the panel where the indicator is placed. | |
bool | IsVerticalIndicator [get, set] |
Gets or sets a value indicating whether the indicator is intended to be displayed as a vertical indicator. | |
bool | UseCandles [get] |
Gets a value indicating whether the indicator uses candle data series. | |
int | CurrentBar [get] |
Bars number. All 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. | |
IDataSeries< decimal >? | SourceDataSeries [get, set] |
Gets or sets the data series used as the source for the indicator's calculations. | |
decimal | this[int index] [get, protected set] |
Gets or sets the value of the first data series of the indicator at the specified index. | |
Properties inherited from ATAS.Indicators.ChartObject | |
bool | Visible [get, set] |
Gets or sets a value indicating whether the chart object is visible. | |
bool | Locked [get, set] |
Gets or sets a value indicating whether the chart object is locked. | |
bool | AllowedInteraction [get] |
Gets a value indicating whether interaction with the chart object is allowed. | |
Events | |
PropertyChangedEventHandler | PropertyChanged |
PropertyChangedEventHandler | PanelPropertyChanged |
Action< int > | BarValueChanged |
Event that is raised when the value of a bar in the indicator changes. | |
Events inherited from ATAS.Indicators.Filters.TrackedPropertyBase | |
PropertyChangedEventHandler | PropertyChanged |
Events inherited from ATAS.Indicators.INotifyPanelPropertyChanged | |
PropertyChangedEventHandler | PanelPropertyChanged |
Occurs when a panel property value changes. | |
Base class for custom indicators in a chart.
|
protected |
|
protected |
Adds an indicator to the list of used indicators by this indicator.
indicator | The indicator to be added to the list of used indicators. |
|
protectedvirtual |
Performs the calculation for the indicator at the specified bar and value.
bar | The bar number for which the calculation is performed. |
value | The input value from the data series at the specified bar. |
Reimplemented in ATAS.Indicators.ExtendedIndicator.
|
protected |
Clear all data series.
|
virtual |
Reimplemented in ATAS.Indicators.ExtendedIndicator.
|
staticprotected |
Measures the performance of a specific operation with the given name. If a performance diagnoser is available, it will be used to measure the performance; otherwise, a default performance counter will be returned.
name | The name of the operation to measure performance for. |
|
protectedpure virtual |
The main indicator calculation method is called for each bar on the history, then it is called on each tick.
bar | Bar number. |
value | Input data series value. |
Implemented in PhantomFlow_SFP.Template.Main, and ATAS.Strategies.Chart.SmaChartStrategy.
|
protectedvirtual |
Called when the indicator is being disposed.
|
protectedvirtual |
The method is executed after the end of the calculation.
|
protectedvirtual |
The method is executed before the first calculation.
Reimplemented in PhantomFlow_SFP.Template.Main.
|
protectedvirtual |
The method is executed before a new calculation.
|
protectedvirtual |
This method is called when the SourceDataSeries property is changed.
|
protectedvirtual |
Called when the Visible property changes.
Reimplemented from ATAS.Indicators.ChartObject.
|
protected |
Raises the BarValueChanged event with the specified bar value.
bar | The bar value to pass to the event handlers. |
|
protected |
Raises the PanelPropertyChanged event with the specified property name.
name | The name of the property that changed. |
|
protected |
Raises the PropertyChanged event with the specified event arguments.
sender | The sender of the event. |
e | The event arguments. |
|
protected |
Raises the PropertyChanged event for the specified property name.
propertyName | The name of the property that changed. |
|
protectedvirtual |
Recalculate the indicator values on each bar.
Reimplemented in ATAS.Indicators.ExtendedIndicator.
override string ATAS.Indicators.BaseIndicator.ToString | ( | ) |
Converts the current instance of the indicator to its string representation.
|
protected |
The list of indicators that are being used by this indicator.
|
get |
Bars number. All 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.
|
get |
List of data series used by the indicator.
|
getset |
Gets or sets a value indicating whether the indicator object has been disposed of.
|
getset |
Gets or sets a value indicating whether the indicator is intended to be displayed as a vertical indicator.
|
get |
List of line series used by the indicator.
|
getset |
Name of the indicator.
|
getset |
The name of the panel where the indicator is placed.
|
staticgetprotected |
Indicator performance tracker.
|
getset |
Gets or sets the data series used as the source for the indicator's calculations.
The source data series provides the input data for the indicator's calculations. When this property is set, the indicator will automatically recalculate its values based on the new source data series.
|
getprotected set |
Gets or sets the value of the first data series of the indicator at the specified index.
index | The index of the value to get or set. |
|
get |
Gets a value indicating whether the indicator uses candle data series.
|
staticgetsetprotected |
Set to true
to measure the performance of all indicators.
Action<int> ATAS.Indicators.BaseIndicator.BarValueChanged |
Event that is raised when the value of a bar in the indicator changes.
PropertyChangedEventHandler ATAS.Indicators.BaseIndicator.PanelPropertyChanged |
PropertyChangedEventHandler ATAS.Indicators.BaseIndicator.PropertyChanged |