Class: PriceStyle

StockChartX. PriceStyle


new PriceStyle()

The base class for price styles.

Members


<static> registeredPriceStyles. :Object

Gets object with information about registered price styles. Key is class name and value is constructor.
Type:
  • Object

chart :StockChartX.Chart

The parent chart.
Type:

<readonly> mainPanel :StockChartX.ChartPanel

The chart panel.
Type:

<readonly> plot :Plot

The price style plot.
Type:
  • Plot

Methods


<static> deserialize(state)

Deserializes price style.
Parameters:
Name Type Description
state Object The state of price style.
Returns:
Type
IPriceStyle

<static> PriceStyleRegistrar.create(className)

Creates price style instance.
Parameters:
Name Type Description
className string The class name of price style.
Returns:
Type
IPriceStyle

<protected> createPlot()

Creates plot object for the price style.
Returns:
Type
StockChartX.Plot

dataSeriesSuffix()

Returns data series suffix which should be used to get primary data series.
Returns:
Type
string

destroy()

Destroys price style.

loadState(state)

Restores price style state.
Parameters:
Name Type Description
state object The state.
See:

primaryDataSeriesSuffix(suffix)

Returns primary data series suffix.
Parameters:
Name Type Description
suffix string The requesting data series suffix.
Returns:
Type
string

saveState()

Saves price style state.
See:
Returns:
The state.
Type
object

updateComputedDataSeries()

Updates computed data series. Some price styles use their own OHLC values (like P&F, Kagi, ...).