VERSION 1.13 @ 2018-08-24 09:41:58.695938
Volume Color is reversed in v1.13 dev #3227 XSS in indicatorsFile parameter #3210 Unknown 1 minute resolution in resolutions widget #3207 What does supports_group_request do? #3183 Improved documentation for intraday_multipliers #3176 Please run a spell checker over the Wiki #3172 Disable "This chart layout has more than 1000 drawings" popup #3158 Problem with drawings in `60S` resolution #3147 Pivot Points are same across Hourly and Daily Timeframe #3144 Add useful default for minSize in getMarks #3139 JS API from/to vs. startDate/endDate inconsistency #3136 Minor wiki error: three -> four #3134 Defaults for chart style and interval favorites does not work #3036 Add support to disable modify order #3015 Cannot read property 'contains' of null if chart container is not visible #2999 Spread/Ratio indicators #2875 Initial bars load glitch #2665 Bars are shifted when the exchange time is negative #2652 Question for previous close price line #2643 SymbolInfo ticker is mandatory, despite what docs say #2581 12/31/2017 is missing when TZ time is negative #2571 TERMINAL: notifications log tab in the bottom panel #2538 The problem with translating the timeframes into Russian. #2494 Adaptive top panel #2491 Session and Cookie #2484 Maximum call stack size exceeded #2477 1.12 custom save_load_adapter UI event exceptions #2448 How to change color to the up fractals of the Williams Fractals? #2425 Timescale marks are not displayed correctly in version 1.11 #2423 Display "Delayed" status on the chart #2369 Add default quantity for symbols #2322 Add Market Depth in TradingTerminal #2316 TERMINAL: Change "Don't show order confirmations" from a broker #2261 Scale Ratio #2240 getBars not called after symbol change #2062 side_toolbar_in_fullscreen_mode doesn't work #2036 Adding link in market details widget #2021 Cannot read property 'favorite' of undefined (indicators) #1998 Add Pivot Points #1747 Multiple watchlists #1697 MACD EMA based #1300 Add Themes #1277 Change study default scale #1170 Show dialog when insert Correlation Coefficient #1169 How to get current status of log scale? #1050 Missing onVisibleRangeChange event #813 Synchronous XMLHttpRequest on the main thread is deprecated #773 "Hide All Drawing Tools" button doesn't hide the price of "Horizontal Line" #477
This commit is contained in:
@@ -19,6 +19,7 @@ This datafeed is implemented in [TypeScript](https://github.com/Microsoft/TypeSc
|
||||
Before building or bundling your code you need to run `npm install` to install dependencies.
|
||||
|
||||
`package.json` contains some handy scripts to build or generate the bundle:
|
||||
|
||||
- `npm run compile` to compile TypeScript source code into JavaScript files (output will be in `./lib` folder)
|
||||
- `npm run bundle-js` to bundle multiple JavaScript files into one bundle (it also bundle polyfills)
|
||||
- `npm run build` to compile and bundle (it is a combination of all above commands)
|
||||
@@ -26,6 +27,7 @@ Before building or bundling your code you need to run `npm install` to install d
|
||||
NOTE: if you want to minify the bundle code, you need to set `ENV` environment variable to a value different from `development`.
|
||||
|
||||
For example:
|
||||
|
||||
```bash
|
||||
export ENV=prod
|
||||
npm run bundle-js # or npm run build
|
||||
|
||||
@@ -49,14 +49,14 @@ var UDFCompatibleDatafeedBase = /** @class */ (function () {
|
||||
UDFCompatibleDatafeedBase.prototype.calculateHistoryDepth = function (resolution, resolutionBack, intervalBack) {
|
||||
return undefined;
|
||||
};
|
||||
UDFCompatibleDatafeedBase.prototype.getMarks = function (symbolInfo, startDate, endDate, onDataCallback, resolution) {
|
||||
UDFCompatibleDatafeedBase.prototype.getMarks = function (symbolInfo, from, to, onDataCallback, resolution) {
|
||||
if (!this._configuration.supports_marks) {
|
||||
return;
|
||||
}
|
||||
var requestParams = {
|
||||
symbol: symbolInfo.ticker || '',
|
||||
from: startDate,
|
||||
to: endDate,
|
||||
from: from,
|
||||
to: to,
|
||||
resolution: resolution,
|
||||
};
|
||||
this._send('marks', requestParams)
|
||||
@@ -83,14 +83,14 @@ var UDFCompatibleDatafeedBase = /** @class */ (function () {
|
||||
onDataCallback([]);
|
||||
});
|
||||
};
|
||||
UDFCompatibleDatafeedBase.prototype.getTimescaleMarks = function (symbolInfo, startDate, endDate, onDataCallback, resolution) {
|
||||
UDFCompatibleDatafeedBase.prototype.getTimescaleMarks = function (symbolInfo, from, to, onDataCallback, resolution) {
|
||||
if (!this._configuration.supports_timescale_marks) {
|
||||
return;
|
||||
}
|
||||
var requestParams = {
|
||||
symbol: symbolInfo.ticker || '',
|
||||
from: startDate,
|
||||
to: endDate,
|
||||
from: from,
|
||||
to: to,
|
||||
resolution: resolution,
|
||||
};
|
||||
this._send('timescale_marks', requestParams)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"rollup-plugin-buble": "0.15.0",
|
||||
"rollup-plugin-node-resolve": "3.0.0",
|
||||
"rollup-plugin-uglify": "2.0.1",
|
||||
"typescript": "2.5.3"
|
||||
"typescript": "2.7.1"
|
||||
},
|
||||
"scripts": {
|
||||
"compile": "tsc",
|
||||
|
||||
@@ -70,7 +70,7 @@ type UdfDatafeedTimescaleMark = UdfDatafeedMarkType<TimescaleMark>;
|
||||
|
||||
function extractField<Field extends keyof Mark>(data: UdfDatafeedMark, field: Field, arrayIndex: number): Mark[Field];
|
||||
function extractField<Field extends keyof TimescaleMark>(data: UdfDatafeedTimescaleMark, field: Field, arrayIndex: number): TimescaleMark[Field];
|
||||
function extractField<Field extends keyof (TimescaleMark & Mark)>(data: UdfDatafeedMark & UdfDatafeedTimescaleMark, field: Field, arrayIndex: number): (TimescaleMark & Mark)[Field] {
|
||||
function extractField<Field extends keyof (TimescaleMark | Mark)>(data: UdfDatafeedMark | UdfDatafeedTimescaleMark, field: Field, arrayIndex: number): (TimescaleMark | Mark)[Field] {
|
||||
const value = data[field];
|
||||
return Array.isArray(value) ? value[arrayIndex] : value;
|
||||
}
|
||||
@@ -135,19 +135,19 @@ export class UDFCompatibleDatafeedBase implements IExternalDatafeed, IDatafeedQu
|
||||
return undefined;
|
||||
}
|
||||
|
||||
public getMarks(symbolInfo: LibrarySymbolInfo, startDate: number, endDate: number, onDataCallback: GetMarksCallback<Mark>, resolution: ResolutionString): void {
|
||||
public getMarks(symbolInfo: LibrarySymbolInfo, from: number, to: number, onDataCallback: GetMarksCallback<Mark>, resolution: ResolutionString): void {
|
||||
if (!this._configuration.supports_marks) {
|
||||
return;
|
||||
}
|
||||
|
||||
const requestParams: RequestParams = {
|
||||
symbol: symbolInfo.ticker || '',
|
||||
from: startDate,
|
||||
to: endDate,
|
||||
from: from,
|
||||
to: to,
|
||||
resolution: resolution,
|
||||
};
|
||||
|
||||
this._send('marks', requestParams)
|
||||
this._send<Mark[] | UdfDatafeedMark>('marks', requestParams)
|
||||
.then((response: Mark[] | UdfDatafeedMark) => {
|
||||
if (!Array.isArray(response)) {
|
||||
const result: Mark[] = [];
|
||||
@@ -174,19 +174,19 @@ export class UDFCompatibleDatafeedBase implements IExternalDatafeed, IDatafeedQu
|
||||
});
|
||||
}
|
||||
|
||||
public getTimescaleMarks(symbolInfo: LibrarySymbolInfo, startDate: number, endDate: number, onDataCallback: GetMarksCallback<TimescaleMark>, resolution: ResolutionString): void {
|
||||
public getTimescaleMarks(symbolInfo: LibrarySymbolInfo, from: number, to: number, onDataCallback: GetMarksCallback<TimescaleMark>, resolution: ResolutionString): void {
|
||||
if (!this._configuration.supports_timescale_marks) {
|
||||
return;
|
||||
}
|
||||
|
||||
const requestParams: RequestParams = {
|
||||
symbol: symbolInfo.ticker || '',
|
||||
from: startDate,
|
||||
to: endDate,
|
||||
from: from,
|
||||
to: to,
|
||||
resolution: resolution,
|
||||
};
|
||||
|
||||
this._send('timescale_marks', requestParams)
|
||||
this._send<TimescaleMark[] | UdfDatafeedTimescaleMark>('timescale_marks', requestParams)
|
||||
.then((response: TimescaleMark[] | UdfDatafeedTimescaleMark) => {
|
||||
if (!Array.isArray(response)) {
|
||||
const result: TimescaleMark[] = [];
|
||||
@@ -216,7 +216,7 @@ export class UDFCompatibleDatafeedBase implements IExternalDatafeed, IDatafeedQu
|
||||
return;
|
||||
}
|
||||
|
||||
this._send('time')
|
||||
this._send<string>('time')
|
||||
.then((response: string) => {
|
||||
const time = parseInt(response);
|
||||
if (!isNaN(time)) {
|
||||
@@ -237,7 +237,7 @@ export class UDFCompatibleDatafeedBase implements IExternalDatafeed, IDatafeedQu
|
||||
exchange: exchange,
|
||||
};
|
||||
|
||||
this._send('search', params)
|
||||
this._send<UdfSearchSymbolsResponse | UdfErrorResponse>('search', params)
|
||||
.then((response: UdfSearchSymbolsResponse | UdfErrorResponse) => {
|
||||
if (response.s !== undefined) {
|
||||
logMessage(`UdfCompatibleDatafeed: search symbols error=${response.errmsg}`);
|
||||
@@ -276,7 +276,7 @@ export class UDFCompatibleDatafeedBase implements IExternalDatafeed, IDatafeedQu
|
||||
symbol: symbolName,
|
||||
};
|
||||
|
||||
this._send('symbols', params)
|
||||
this._send<ResolveSymbolResponse | UdfErrorResponse>('symbols', params)
|
||||
.then((response: ResolveSymbolResponse | UdfErrorResponse) => {
|
||||
if (response.s !== undefined) {
|
||||
onError('unknown_symbol');
|
||||
|
||||
Reference in New Issue
Block a user