An extended base class for custom indicators that provide additional functionality for drawing, alerts, market data handling, etc.
More...
|
void | Draw (RenderContext context, DrawingLayouts layout) |
|
override void | Dispose () |
|
void | ApplyDefaultColors () |
| Applies default colors to the drawing elements.
|
|
void | SubscribeToTimer (TimeSpan period, Action callback) |
| Registers the callback and periodically calls it with specified period.- Parameters
-
period | A period of market data time used to repeatedly invoke the callback. |
callback | A method that is called each time a specified period of market data time passes. |
|
|
void | UnsubscribeFromTimer (TimeSpan period, Action callback) |
| Unregister the callback from periodic invocations.- Parameters
-
period | Subscribed period of invocations. |
callback | A method to be unregistered. |
|
|
virtual void | Dispose () |
|
override string | ToString () |
| Converts the current instance of the indicator to its string representation.
|
|
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.
|
|
void | SubscribeToTimer (TimeSpan period, Action callback) |
| Registers the callback and periodically calls it with specified period.
|
|
void | UnsubscribeFromTimer (TimeSpan period, Action callback) |
| Unregister the callback from periodic invocations.
|
|
|
| ExtendedIndicator (bool useCandles=false) |
|
virtual void | OnContainerChanged (IIndicatorContainer container) |
| This method is called when the value of the Container property changes.
|
|
virtual void | OnDataProviderChanged (IIndicatorDataProvider oldDataProvider, IIndicatorDataProvider newDataProvider) |
| This method is called when the value of the DataProvider property changes.
|
|
virtual void | OnPortfolioChanged (Portfolio portfolio) |
| This method is called when the value of the Portfolio changes.
|
|
virtual void | OnPositionChanged (Position position) |
| This method is called when the value of the Position changes.
|
|
virtual void | OnNewOrder (Order order) |
| This method is called when a new order is received.
|
|
virtual void | OnOrderChanged (Order order) |
| Called when an existing order is modified (changed).
|
|
virtual void | OnNewMyTrade (MyTrade myTrade) |
| Called when a new trade executed by the indicator's own strategy is received.
|
|
virtual void | OnOrderRegisterFailed (Order order, string message) |
| Called when an attempt to register (place) a new order fails.
|
|
virtual void | OnOrderCancelFailed (Order order, string message) |
| Called when an attempt to cancel an existing order fails.
|
|
virtual void | OnOrderModifyFailed (Order order, Order newOrder, string error) |
| Called when an attempt to modify an existing order fails.
|
|
virtual void | OnRender (RenderContext context, DrawingLayouts layout) |
| Override this method for implementing your own data rendering logic.
|
|
void | SubscribeToDrawingEvents (DrawingLayouts flags) |
| Method for specifying the list of layouts in which rendering will be performed.
|
|
void | RedrawChart (RedrawArg? redrawArg=null) |
| Call to redraw chart.
|
|
void | AddAlert (string soundFile, string instrument, string message, CrossColor background, CrossColor foreground) |
| Adds an alert for a specific instrument with custom properties.
|
|
void | AddAlert (string soundFile, string message) |
| Adds an alert with the specified sound file and message to the chart.
|
|
DrawingText | AddText (string tag, string text, bool isAbovePrice, int bar, decimal price, int yOffset, int xOffset, Color textColor, Color outlineColor, Color fillColor, float fontSize, DrawingText.TextAlign align, bool autoSize=false) |
| Adds a drawing text element to the chart at the specified position.
|
|
override void | RecalculateValues () |
| Recalculate the indicator values on each bar.
|
|
IndicatorCandle | GetCandle (int bar) |
| Gets the IndicatorCandle object at the specified bar index.
|
|
override void | Calculate (int bar, decimal value) |
| Performs the calculation for the indicator at the specified bar and value.- Parameters
-
bar | The bar number for which the calculation is performed. |
value | The input value from the data series at the specified bar. |
|
|
virtual void | OnNewTrades (IEnumerable< MarketDataArg > trades) |
| Handles a collection of new trade data represented by MarketDataArg objects.
|
|
virtual void | OnNewTrade (MarketDataArg trade) |
| Handles an individual trade represented by a MarketDataArg object.
|
|
virtual void | OnBestBidAskChanged (MarketDataArg depth) |
| Handles changes in the best bid or ask prices in the market depth represented by a MarketDataArg object.
|
|
virtual void | MarketDepthsChanged (IEnumerable< MarketDataArg > depths) |
| Handles changes in multiple market depths represented by an IEnumerable<MarketDataArg>.
|
|
virtual void | MarketDepthChanged (MarketDataArg depth) |
| Handles changes in a single market depth represented by a MarketDataArg object.
|
|
virtual void | OnCumulativeTrade (CumulativeTrade trade) |
| Handles a cumulative trade event represented by a CumulativeTrade object.
|
|
virtual void | OnUpdateCumulativeTrade (CumulativeTrade trade) |
| Handles an update event for a cumulative trade represented by a CumulativeTrade object.
|
|
virtual void | OnCumulativeTradesResponse (CumulativeTradesRequest request, IEnumerable< CumulativeTrade > cumulativeTrades) |
| Called when a response for a cumulative trades request is received.
|
|
void | RequestForCumulativeTrades (CumulativeTradesRequest request) |
| Sends a request for cumulative trades data to the online data provider.
|
|
virtual void | OnFixedProfilesResponse (IndicatorCandle fixedProfile, FixedProfilePeriods period) |
|
virtual void | OnFixedProfilesResponse (IndicatorCandle fixedProfileScaled, IndicatorCandle fixedProfileOriginScale, FixedProfilePeriods period) |
| This method is called when the online data provider responds with fixed profile data. Override this method in derived classes to handle the received fixed profile data.
|
|
void | GetFixedProfile (FixedProfileRequest request) |
| Requests fixed profile data from the online data provider.
|
|
async Task< FixedProfileResponse?> | RequestFixedProfileAsync (FixedProfileRequest request) |
| Asynchronously requests a fixed market profile parameterized with FixedProfileRequest.
|
|
Task | SubscribeMarketByOrderData () |
| Subscribes to the market by order data.
|
|
ITradesCache | GetTradesCache (TimeSpan period) |
| Returns a trades cache.
|
|
IMarketByOrdersCache | GetMarketByOrdersCache (TimeSpan period) |
| Returns a market by order data cache.
|
|
IMarketByOrdersWithTradesCache | GetMarketByOrdersWithTradesCache (TimeSpan period) |
| Returns a market by order data and trades cache.
|
|
virtual void | OnMarketByOrdersChanged (IEnumerable< MarketByOrder > values) |
| Handles a collection of market by order data represented by MarketByOrder objects.
|
|
virtual void | OnApplyDefaultColors () |
| Invoked to apply default colors to the drawing elements.
|
|
| 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.
|
|
virtual void | OnVisibleChanged () |
| Called when the Visible property changes.
|
|
virtual void | LockedOnChanged () |
| Called when the Locked property changes.
|
|
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.
|
|
|
bool | FullScreenMode [get, set] |
| Gets or sets full screen mode for the indicator. Could be applied only to the vertical indicators('IsVerticalIndicator = true')
|
|
bool | DenyToChangePanel [get, set] |
| Gets or sets a value indicating whether changing the indicator's panel is denied. For vertical indicators, it is always denied.
|
|
bool | DrawAbovePrice [get, set] |
| Gets or sets a value indicating whether custom painting should be performed on top of rendered bars.
|
|
bool | EnableCustomDrawing [get, protected set] |
| Gets or sets a value indicating whether custom drawing is enabled for the indicator.
|
|
bool | ShowDescription [get, set] |
| Gets or sets a value indicating whether the description of the indicator should be shown.
|
|
IIndicatorContainer? | Container [get, set] |
| Gets or sets the container in which the indicator is hosted.
|
|
IIndicatorDataProvider? | DataProvider [get, set] |
| Gets or sets the data provider for the indicator.
|
|
List< LineTillTouch > | HorizontalLinesTillTouch = new() [get] |
| Gets the collection of horizontal lines used to track touch points on the chart.
|
|
List< TrendLine > | TrendLines = new() [get] |
| Gets the collection of trend lines on the chart.
|
|
List< DrawingRectangle > | Rectangles = new() [get] |
| Gets the collection of rectangles on the chart.
|
|
SyncDictionary< string, DrawingText > | Labels = new() [get, set] |
| Gets or sets the collection of named drawing text elements.
|
|
IEnumerable< MarketByOrder > | MarketByOrders [get] |
| Gets a snapshot of the current market by order data.
|
|
DateTime | MarketTime [get] |
| Current market time.
|
|
DateTime | UtcTime [get] |
| Current UTC time.
|
|
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.
|
|
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.
|
|
DateTime | MarketTime [get] |
| Current market time.
|
|
DateTime | UtcTime [get] |
| Current UTC time.
|
|
An extended base class for custom indicators that provide additional functionality for drawing, alerts, market data handling, etc.