Post navigation

API, How-to

Load and Save Technical Analysis Definitions

The following API calls offers saving and loading of the entire Chart
state, including price-type, time-scale, selected symbol, drawings and
indicators.

Get Data From The Chart (For Saving):

NameTypeDescription
blnSymbolBooleanTrue to include current symbol id and name.
blnTimeScaleBooleanTrue to include current time-scale.
blnDrawingBooleanTrue to include all drawings.
blnIndicatorsBooleanTrue to include all indicators.
blnPriceTypeBooleanTrue to include the current price-type.

Return Value
The return value is the definition JSON object.

Loading Data Back Into The Chart:

NameTypeDescription
objJSONObjectJavaScript objectThe Technical Analysis data

Return Value
There is no returned value

Examples

Example:

Example2:

Callbacks For Timing Load/Save Of Data

In addition, you can add callbacks to the chart in order to know when it is safe to load or save this data.

The first parameter is for Future-Use (please ignore it). You can use the symbol and timescale as key for saving.