Click or drag to resize

SharpScriptBase Class

Base class for Indicators
Inheritance Hierarchy

Namespace:  SharpCharts.Base.SharpScript
Assembly:  SharpCharts.Base (in SharpCharts.Base.dll) Version: 1.0.0.42 (1.0.0.42)
Syntax
C#
public abstract class SharpScriptBase : PrintLogBase, 
	INotifyPropertyChanged, ISeries<double>, ITemplate

The SharpScriptBase type exposes the following members.

Constructors
  NameDescription
Public methodSharpScriptBase
Top
Properties
  NameDescription
Public propertyBackBrush
Gets the Background brush series
Public propertyBarBrush
Gets the Bar brush series
Public propertyBars
Gets or sets the Primary bar
Public propertyBarsArray
Gets the Bars array
Public propertyBarsInProgress
Gets the Current bars array in progress
Public propertyBarWickBrushes
Public propertyCalculate
Gets or sets the Calculate type
Public propertyClose
Gets the Close series
Public propertyCloses
Gets the Close series array
Public propertyCount
Gets the total bar count
Public propertyCurrentBar
Gets the Current bar
Public propertyCurrentBars
Current bar series
Public propertyDefaultTemplate
Gets the Default template of the sharp script
Protected propertyDialogService (Inherited from MessageBoxBase.)
Public propertyDispatcher
Public propertyDisplayName
Gets the display name
Public propertyError
Gets the Error string
(Inherited from MessageBoxBase.)
Protected propertyFileService (Inherited from MessageBoxBase.)
Public propertyGuid
Public propertyHigh
Gets the High series
Public propertyHighs
Gets the High series array
Public propertyInput
Gets or sets the Input series
Public propertyIsAutoScale
Public propertyIsFirstScriptInPane
Public propertyIsFirstTickOfBar
Is first tick of bar
Protected propertyIsLevel1Subscribed Obsolete.
This property has been depreciated Gets or sets if Level1 events are subscribed or not. Evaluated only when the scripts state is set to Initialize
Protected propertyIsLevel2Subscribed Obsolete.
This property has been depreciated Gets or sets is Level2 events are subscribed or not. Evaluated only when the scripts state is set to Initialize
Public propertyIsOverlay
Gets or sets Is overlay
Public propertyIsRealTime
Gets if the sharpscript Is real time
Public propertyItemInt32
Gets the value of the sharp script
Public propertyItemString
Gets the IDataErrorInfo error string
(Inherited from MessageBoxBase.)
Public propertyItemInt32, Boolean
Gets the value of sharp script
Public propertyLines
Gets or sets the Line array
Public propertyLow
Gets the Low series
Public propertyLows
Gets the Low series array
Public propertyMedian
Gets the Median series
Public propertyMedians
Gets the Median series array
Protected propertyMessageBox (Inherited from MessageBoxBase.)
Public propertyName
Gets the name of the Sharp Script
Public propertyOpen
Gets the Open series
Public propertyOpenInterest
Gets the Open Interest series
Public propertyOpenInterests
Get the Open Interest series array
Public propertyOpens
Gets the Open series array
Public propertyPlotPens
Gets the Plot pen series array
Public propertyPlots
Gets or sets the Plot array
Public propertyPriceFormat Obsolete.
Gets the Price format string
Public propertyPriceType
Gets or sets the Price type
Public propertySeriesDisplayName
Gets the series display name
Public propertyShowAdditionalParameters
Gets or sets if additional parameters will be displayed in the SharpScript selector view
Public propertyShowLines
Gets or sets whether the Lines parameter will be displayed in the Indicator Selector view
Public propertyShowNativeParameters
Gets or sets whether Native parameters will be displayed in the Indicator Selector view
Public propertyShowPlots
Gets or sets whether the Plots parameter will be displayed in the Indicator Selector view
Protected propertySingletonService (Inherited from MessageBoxBase.)
Public propertyState
Gets the current state of the sharp script
Public propertyTemplate
Gets the name of the template
Public propertyTemplateType
Gets the Template type
Public propertyTime
Gets the Time series
Public propertyTimes
Gets the Time series array
Public propertyTypical
Gets the Typical series
Public propertyTypicals
Gets the Typical series array
Public propertyValues
Gets the Plot value series array
Public propertyViewModel
Gets the View associated with the Sharp Script
Public propertyVolume
Gets the Volume series
Public propertyVolumes
Get the Volume series array
Public propertyWeighted
Gets the Weighted series
Public propertyWeighteds
Gets the Weighted series array
Top
Methods
  NameDescription
Protected methodAddBars(BarType)
Add a secondary series of the specified barType. Instrument, Start date, End date, Session, Backfill Policy is referenced from the parent bar
Protected methodAddBars(String)
Add a secondary series for the specified instrument. BarType, Start date, End date, Session, Backfill Policy is referenced from the parent bar
Protected methodAddBars(String, BarType)
Add secondary bar series Start date, end date, session, Backfill Policy is referenced from the parent bar
Protected methodAddBars(String, BarType, DateTime, DateTime, Session, BackfillPolicy)
Add a secondary bar series
Protected methodAddBars(String, BarType, DateTime, DateTime, Session, Boolean)
Adds a secondary bar series
Public methodAddIndicatorT
Adds and/or retrieves sharp script from the cache
Public methodAddIndicatorT(ISeriesDouble)
Adds and/or retrieves sharp script from the cache
Public methodAddIndicatorT(Object)
Adds and/or retrieves and sharp script from the cache
Public methodAddIndicatorT(ISeriesDouble, Object)
Adds and/or retrieves and sharp script from the cache
Public methodAddLine
Add a new line
Public methodAddPlot
Add a new Plot
Protected methodAlert(String)
Sends a new Alert message to the Alert View
Protected methodAlert(AlertPriority, String)
Sends a new Alert message to the Alert View
Protected methodAlert(String, String)
Sends a new Alert message to the Alert View
Protected methodAlert(String, String, TimeSpan)
Sends a new Alert message to the Alert View
Protected methodAlert(AlertPriority, String, Brush, Brush)
Sends a new Alert message to the Alert View
Protected methodAlert(String, AlertPriority, String, Brush, Brush, TimeSpan)
Sends a new Alert message to the Alert View
Public methodCalculateMinMax
Calculates the minimum and maximum values of the axis
Public methodCalculatePriceFromY
Calculates the price from Y point
Public methodCalculateXPoint(Double, Int32)
Calculates the x point
Public methodCalculateXPoint(ChartStyle, Double, Int32, Int32)
Calculates the x point
Public methodCalculateYFromPrice
Calculate the Y point from price
Protected methodClone
Clones a sharpScript object
Public methodCrossAbove(Double, ISeriesDouble, Int32)
Evaluates when value crosses above a series
Public methodCrossAbove(ISeriesDouble, ISeriesDouble, Int32)
Evaluates when 2 (two) series crosses each other
Public methodCrossAbove(ISeriesDouble, Double, Int32)
Evaluates when the series crosses above the value
Public methodCrossBelow(Double, ISeriesDouble, Int32)
Evaluates when a value crosses below a series
Public methodCrossBelow(ISeriesDouble, ISeriesDouble, Int32)
Evaluates when 2 (two) series crosses below each other
Public methodCrossBelow(ISeriesDouble, Double, Int32)
Evaluates when series crosses below a value
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize (Overrides ObjectFinalize.)
Protected methodGetBarIndexFromTime(DateTime)
Gets the bar index of the primary bar from time. Returns -1 if time is beyond the bars range
Protected methodGetBarIndexFromTime(Bars, DateTime)
Gets the bar index from time. Returns -1 if time is beyond the bars range
Protected methodGetCurrentAsk
Gets the current ask price of the primary bar. For historical bars, will return the corresponding close value of the bars.
Protected methodGetCurrentAsk(Int32)
Gets the current ask price. Works in realtime only
Protected methodGetCurrentAskVolume
Gets the ask volume of the primary bars. Works in realtime only.
Protected methodGetCurrentAskVolume(Int32)
Gets the ask volume of the specified bars. Works in realtime only.
Protected methodGetCurrentBid
Gets the current bid price of the primary bar. For historical bars, will return the corresponding close value of the bars.
Protected methodGetCurrentBid(Int32)
Gets the current bid price. For historical bars, will return the corresponding close value of the bars.
Protected methodGetCurrentBidVolume
Gets the bid volume of the primary bars. Works in realtime only.
Protected methodGetCurrentBidVolume(Int32)
Gets the bid volume of the specified bars. Works in realtime only.
Public methodGetFrozenBrush
Returns the brush as frozen
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetLastPrice
Returns the last traded price of the primary bars. In case the realtime price is not available the closing value of the last available bar is returned
Public methodGetLastPrice(Int32)
Returns the last traded price. In case the real time price is not available the closing value of the last available bar is returned
Protected methodGetSessionDefinition
Get the session definition for the specified time
Protected methodGetSessionStartDate
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasValue
Returns if the underlying series has a value
Protected methodInvokeAsync
Invoke any action. It is recommended to draw any DrawingBase by invoking this method
Public methodIsEqual
Compares two sharp script objects
Public methodIsInputEquals
Compares two input
Protected methodLog
Log message. It will be displayed in the Logs tab in Main View
(Inherited from PrintLogBase.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodNotifyPropertyChanged
Notify property change
Protected methodOnBarUpdate
Called on a new tick
Protected methodOnLevel1
Called on every level1 events for the subscribed instruments (in case of multi-instrument scripts).
Protected methodOnLevel2
Called on every level2 event for the subscribed instruments (in case of multi-instrument scripts).
Protected methodOnStateChange
Called on when the SharpScript state is changed
Public methodPlaySound
Plays a sound file
Public methodPlot
Plots the SharpScript series values
Protected methodPrint(String)
Prints the message in the Output view
(Inherited from PrintLogBase.)
Protected methodPrint(String, Brush)
Prints the message in the Output view
(Inherited from PrintLogBase.)
Public methodRefreshChartObject
Refreshes/re-renders the chartOject. Can be called only when the ShartScript.State == State.Realtime
Public methodRemoveChartObject
Removes all the chartObjects drawn by the sharpScript code
Public methodRemoveChartObject(String)
Removes the chartObject having the tag name. If tag name is null or empty then removes all the chartObjects drawn by the indicator
Protected methodRoundToTickSize(Double)
Returns the round value of the instrument tick size
Protected methodRoundToTickSize(Int32, Double)
Returns the round value of the instrument tick size
Protected methodSetSecondaryBarType
Set the barType of the secondary bars. Can be called only when the State is in Initialize state.
Protected methodSetSecondaryInstrument
Sets the instrument of the secondary bars. Can be called only when State is in Initialize state.
Public methodShare
Protected methodStringFormat
Formats the series value as displayed
Protected methodTickSize
Gets the tick size of the primary instrument
Protected methodTickSize(Int32)
Gets the tick size of the
Protected methodToDate
Returns the date stamp in integer form. For example 15th August 2019 will be returned as 20190815
Public methodToString (Overrides ObjectToString.)
Protected methodToTime
Returns the time stamp in integer form. For example 9:30 AM will return as 93000 1:45 PM will return as 134500
Top
Events
  NameDescription
Public eventPropertyChanged
Property changed event handler
Top
See Also