binbot-charts 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -59,19 +59,20 @@ function TVChartContainer(_ref) {
|
|
|
59
59
|
const lineStyle = order.lineStyle || 0;
|
|
60
60
|
tvWidget.chart().createPositionLine().setText(order.text).setTooltip(order.tooltip).setQuantity(order.quantity).setQuantityFont("bold 12pt Verdana").setQuantityBackgroundColor(order.color).setQuantityBorderColor(order.color).setLineStyle(lineStyle).setLineLength(25).setLineColor(order.color).setBodyFont("bold 12pt Verdana").setBodyBorderColor(order.color).setBodyTextColor(order.color).setPrice(order.price);
|
|
61
61
|
});
|
|
62
|
-
tvWidget.subscribe("onTick", event => onTick(event)); // get latest bar for last price
|
|
63
|
-
|
|
64
|
-
const prices = async () => {
|
|
65
|
-
const data = await tvWidget.activeChart().exportData({
|
|
66
|
-
includeTime: false,
|
|
67
|
-
includeSeries: true,
|
|
68
|
-
includedStudies: []
|
|
69
|
-
});
|
|
70
|
-
getLatestBar(data.data[data.data.length - 1]);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
prices();
|
|
74
62
|
}
|
|
63
|
+
|
|
64
|
+
tvWidget.subscribe("onTick", event => onTick(event)); // get latest bar for last price
|
|
65
|
+
|
|
66
|
+
const prices = async () => {
|
|
67
|
+
const data = await tvWidget.activeChart().exportData({
|
|
68
|
+
includeTime: false,
|
|
69
|
+
includeSeries: true,
|
|
70
|
+
includedStudies: []
|
|
71
|
+
});
|
|
72
|
+
getLatestBar(data.data[data.data.length - 1]);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
prices();
|
|
75
76
|
}); // returned function will be called on component unmount
|
|
76
77
|
|
|
77
78
|
return () => {
|
|
@@ -49,7 +49,7 @@ class Datafeed {
|
|
|
49
49
|
onResultReadyCallback(symbols);
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
_defineProperty(this, "resolveSymbol",
|
|
52
|
+
_defineProperty(this, "resolveSymbol", (symbolName, onSymbolResolvedCallback, onResolveErrorCallback) => {
|
|
53
53
|
if (!symbolName) {
|
|
54
54
|
onResolveErrorCallback("cannot resolve symbol");
|
|
55
55
|
return;
|
package/package.json
CHANGED