Skip to main content
v1.2.0

Templates

Templates allow saving the chart layout to a json based text file (.txt format), which then can later be loaded to the chart.

The following information is saved to a template:
-Chart settings such as chart type and cursor settings
-Color settings
-Added technical indicators and their individual settings
-Added drawing tools and their individual settings

Template excludes:
-Added trading data (templates cannot be used to extract trading data from the chart)
-Heatmaps


Local storage

By default, Technical Analysis Chart saves all the same information that is saved to a template to local storage, when the chart is closed due to for example page reload or window closing. Whenever a chart instance is opened again, the chart checks the local storage for settings from previous sessions and loads them.

This feature can be disabled during chart creation by setting load_from_storage parameter false. This prevents both saving to and loading from the local storage.

trader = TAChart(license_key, load_from_storage = False)

Saving chart as a template

Chart can be saved as a template by clicking the Save as template button found in the toolbar to the left of the chart. This opens a small dialogue allowing you to give a name to the template.

Saving templates

Alternatively, you can save the layout as a template in code by calling save_as_template() method.

trader.save_as_template('templateName')

Loading templates

trader.load_template()

Chart templates are mainly loaded via the user interface. Clicking the Load template button in the toolbar opens a File Upload window allowing you to load any previously saved template file.

Loading templates

It is also possible to load an existing template in code by calling load_template() method. This again opens the File Upload window allowing you to browse previously saved template files.

trader.load_template()