k线数据年限改为10年

master
钟海欣 5 years ago
parent 780759cf9a
commit b0b62021c1
  1. 4
      public/JsApi/Datafeed.js
  2. 20
      src/components/trade/TradingView.vue

@ -18,7 +18,7 @@ Datafeed.prototype.onReady = function(callback) {
// ],
supports_search: false,
supports_group_request: true,
supported_resolutions: [1, 5, 15, 30, 60, 240, 720, 'D', '2D', 'W', 'M'],
supported_resolutions: [1, 5, 15, 30, 60, 240, 720, 'D', 'W'],
supports_marks: true,
supports_timescale_marks: true,
supports_time: true,
@ -94,7 +94,7 @@ Datafeed.prototype.calculateHistoryDepth = function(
localStorage.setItem('resolution', resolution);
return {
resolutionBack: 'M',
intervalBack: 24,
intervalBack: 120,
};
};

@ -93,16 +93,24 @@ export default {
'240',
'720',
'D',
'2D',
'W',
'M',
],
has_seconds: false, //
has_intraday: true, //
has_daily: true, //
has_weekly_and_monthly: true, //
seconds_multipliers: [], //
intraday_multipliers: ['1', '5', '15', '30', '60', '240', '720'], //
intraday_multipliers: [
'1',
'5',
'15',
'30',
'60',
'240',
'720',
'D',
'W',
], //
has_empty_bars: true,
force_session_rebuild: false,
has_no_volume: false, //
@ -489,6 +497,12 @@ export default {
res.data.length
) {
// fromK线 toK线
// console.log(from, to);
// console.log(
// res.data[0].timestamp,
// res.data[res.data.length - 1].timestamp
// );
if (from && to) {
if (
res.data[0].timestamp >= from * 1000 &&

Loading…
Cancel
Save