We do our best to make every next version fully compartible with the previous one, but sometimes big changes requires you to make minor changes in your code when upgrading to a new version.
Note: you can check Charting Library version by executing TradingView.version() in a browser console.
Here is the list of breaking changes:
Version 1.12
Charting Library
-
charting_library/charting_library.min.jsnow is UMD module.
If you just inline this script into HTML - nothing changed.
But if import it as a module you should importwidget,versionandonreadyfunctions straight from it. -
searchSymbolsByNameis removed fromJS-API, usesearchSymbolsinstead.
Study overrides:
- Overrides for
Overlayshould be applied only viastudies_overrides(andapplyStudiesOverridesin runtime). In previous versions you had to useoverridesandapplyOverrides). See [[Studies-Overrides|Studies-Overrides]] page. - Since this version you cannot override
showStudyArgumentsandshowLastValueusingoptionskeyword.
Trading Terminal
-
hasHistoryflag is removed. UsehistoryColumnsto display History in Account Manager.
The following stuff is still supported in Trading Terminal, but will be deprecated in future versions:
-
subscribePLandunsubscribePL. The broker should callplUpdatemethod of the Host every time when the profit is changed. -
supportDOMremoved. DOM widget visibility can be set usingdome_widgetfeatureset.
The Trading Controller is replaced with [[Broker API]].
The following changes should be applied to your Trading Controller implementation to move to new Broker API:
- Method
setHostis removed. Host should be passed to the constructor of Broker API. - Method
buttonDropdownItemsremoved. Broker API should update [[Broker API|Trading-Host]] usingsetButtonDropdownActions. - Methods
configFlagsanddurationsare removed. Use [[Widget Constructor]] fields instead. - All methods that returned
$.Deferredshould be modified to return Promise. - Method
chartContextMenuItemsis renamed tochartContextMenuActions. - Method
isTradablechanged to return a Promise instead of a Boolean value. - All string constants ("working", "buy" etc.) should be replaced with the appropriate number constants.
- Position
avg_pricerenamed toavgPrice. -
tradingControllerfield in the [[Widget Constructor]] is removed. UsebrokerFactoryinstead.
Version 1.11
Trading Terminal
The following stuff is still supported in Trading Terminal, but will be deprecated in future versions:
-
supportDOMErenamed tosupportDOM. - Changed signature of `showClosePositionDialog.
-
showEditBracketsDialogrenamed toshowPositionBracketsDialog, changed signature.
Version 1.10
- Default behavior of Volume indicator is changed.
Previous behavior: Volume indicator is added/removed when an instrument or a resolution is switched depending on volume support by the instrument. You can get back to this behavior by disabling create_volume_indicator_by_default_once featureset.
New behavior: Volume indicator is added on first load of an empty chart if it is supported by an active instrument.
Version 1.9
- We don't compile Pine scripts anymore. You can still use scripts compiled before.
Version 1.8 of Trading Terminal
- Chart has no option to show only actual orders anymore. Appropriate methods have been removed.
-
showOrderDialogreceives an object instead of arguments list -
showSampleOrderDialogremoved, use [[showOrderDialog|Trading-Host#showorderdialogorder-handler]] instead -
showOrderDialogremoved from [[Broker API|Broker API]], useplaceOrderandmodifyOrderreceivesilentlyargument instead -
reversePosition,closePosition,cancelOrderhave an additional argumentsilently. They should should appropriate dialogs by themselves from now.
Version 1.7
- Since this version it is not enough to call
setSymbolwith the same symbol. You should callonResetCacheNeededCallbackfromsubscribeBarsfirst. Then you can usesetSymbolor newresetDatamethod of the chart. - JSAPI protocol version 1 is not supported any more.
nextTimeandnoDatamust be provided.
Version 1.5
- Added
sourceargument to MACD. You should change MACD creation code to passsourcealso.
chartWidget.chart().createStudy('MACD', false, false, [12, 26, "close", 9])
Version 1.4
- Override
transparencyis not supported anymore. We added transparency support to every color property. Usergbaform to define a color with transparency. Example:
"symbolWatermarkProperties.color" : "rgba(60, 70, 80, 0.05)"
Version 1.3
Override
paneProperties.gridProperties.*is not supported anymore.
Please usepaneProperties.vertGridProperties.*andpaneProperties.horzGridProperties.*Override
mainSeriesProperties.candleStyle.wickColoris not supported anymore.
UsemainSeriesProperties.candleStyle.wickUpColorandmainSeriesProperties.candleStyle.wickDownColor