feat: kline data
This commit is contained in:
parent
e2aef3912c
commit
c4b4f86741
@ -95,88 +95,78 @@ export default {
|
|||||||
theme: 'Dark',
|
theme: 'Dark',
|
||||||
favorites: {
|
favorites: {
|
||||||
intervals: ['30', '240', '1D'],
|
intervals: ['30', '240', '1D'],
|
||||||
},
|
},
|
||||||
customFormatters: {
|
|
||||||
timeFormatter: {
|
|
||||||
format: date => {
|
|
||||||
const _format_str = '%h:%m'
|
|
||||||
return _format_str.replace('%h', toDouble(date.getUTCHours()), 2).replace('%m', toDouble(date.getUTCMinutes()), 2).replace('%s', date.getUTCSeconds(), 2)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
dateFormatter: {
|
|
||||||
format: date => `${date.getUTCFullYear()}-${toDouble(date.getUTCMonth() + 1)}-${toDouble(date.getUTCDate())}`,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
disabled_features: [ // 禁用功能
|
disabled_features: [ // 禁用功能
|
||||||
|
'volume_force_overlay',
|
||||||
'left_toolbar',
|
'left_toolbar',
|
||||||
'timeframes_toolbar',
|
'timeframes_toolbar',
|
||||||
'header_symbol_search',
|
'header_symbol_search',
|
||||||
'header_compare',
|
'header_compare',
|
||||||
// 'header_fullscreen_button',
|
// 'header_fullscreen_button',
|
||||||
'header_widget',
|
'header_widget',
|
||||||
// 'use_localstorage_for_settings',
|
// 'use_localstorage_for_settings',
|
||||||
'save_chart_properties_to_local_storage',
|
'save_chart_properties_to_local_storage',
|
||||||
// 'header_chart_type',
|
// 'header_chart_type',
|
||||||
// 'display_market_status',
|
// 'display_market_status',
|
||||||
'symbol_search_hot_key',
|
'symbol_search_hot_key',
|
||||||
'compare_symbol',
|
'compare_symbol',
|
||||||
'border_around_the_chart',
|
'border_around_the_chart',
|
||||||
'remove_library_container_border',
|
'remove_library_container_border',
|
||||||
'symbol_info',
|
'symbol_info',
|
||||||
// 'header_interval_dialog_button',
|
// 'header_interval_dialog_button',
|
||||||
// 'show_interval_dialog_on_key_press',
|
// 'show_interval_dialog_on_key_press',
|
||||||
'volume_force_overlay',
|
'volume_force_overlay',
|
||||||
// 'header_resolutions',
|
// 'header_resolutions',
|
||||||
// 'legend_context_menu',
|
// 'legend_context_menu',
|
||||||
// new
|
// new
|
||||||
'symbol_info',
|
'symbol_info',
|
||||||
'pane_context_menu',
|
'pane_context_menu',
|
||||||
],
|
],
|
||||||
enabled_features: [ // 启用的功能
|
enabled_features: [ // 启用的功能
|
||||||
'hide_left_toolbar_by_default',
|
'hide_left_toolbar_by_default',
|
||||||
'pane_context_menu',
|
'pane_context_menu',
|
||||||
'hide_last_na_study_output',
|
'hide_last_na_study_output',
|
||||||
'dont_show_boolean_study_arguments',
|
'dont_show_boolean_study_arguments',
|
||||||
],
|
],
|
||||||
|
|
||||||
overrides: {
|
overrides: {
|
||||||
'paneProperties.background': tradingViewStyle.bg,
|
'paneProperties.background': tradingViewStyle.bg,
|
||||||
'symbolWatermarkProperties.transparency': 85,
|
'symbolWatermarkProperties.transparency': 85,
|
||||||
'scalesProperties.backgroundColor': '#151a1e',
|
'scalesProperties.backgroundColor': '#151a1e',
|
||||||
'scalesProperties.textColor': '#888',
|
'scalesProperties.textColor': '#888',
|
||||||
|
|
||||||
'paneProperties.vertGridProperties.color': tradingViewStyle.grid,
|
'paneProperties.vertGridProperties.color': tradingViewStyle.grid,
|
||||||
'paneProperties.horzGridProperties.color': tradingViewStyle.grid,
|
'paneProperties.horzGridProperties.color': tradingViewStyle.grid,
|
||||||
'paneProperties.crossHairProperties.color':
|
'paneProperties.crossHairProperties.color':
|
||||||
tradingViewStyle.crosshair,
|
tradingViewStyle.crosshair,
|
||||||
'scalesProperties.lineColor': tradingViewStyle.lineColor,
|
'scalesProperties.lineColor': tradingViewStyle.lineColor,
|
||||||
'symbolWatermarkProperties.color': 'rgba(0, 0, 0, 0)',
|
'symbolWatermarkProperties.color': 'rgba(0, 0, 0, 0)',
|
||||||
|
|
||||||
'mainSeriesProperties.style': 1,
|
'mainSeriesProperties.style': 1,
|
||||||
|
|
||||||
// Candles styles
|
// Candles styles
|
||||||
'mainSeriesProperties.candleStyle.upColor': tradingViewStyle.long,
|
'mainSeriesProperties.candleStyle.upColor': tradingViewStyle.long,
|
||||||
'mainSeriesProperties.candleStyle.downColor': tradingViewStyle.short,
|
'mainSeriesProperties.candleStyle.downColor': tradingViewStyle.short,
|
||||||
'mainSeriesProperties.candleStyle.drawWick': true,
|
'mainSeriesProperties.candleStyle.drawWick': true,
|
||||||
'mainSeriesProperties.candleStyle.drawBorder': true,
|
'mainSeriesProperties.candleStyle.drawBorder': true,
|
||||||
'mainSeriesProperties.candleStyle.borderColor': '#C400CB',
|
'mainSeriesProperties.candleStyle.borderColor': '#C400CB',
|
||||||
'mainSeriesProperties.candleStyle.borderUpColor':
|
'mainSeriesProperties.candleStyle.borderUpColor':
|
||||||
tradingViewStyle.long,
|
tradingViewStyle.long,
|
||||||
'mainSeriesProperties.candleStyle.borderDownColor':
|
'mainSeriesProperties.candleStyle.borderDownColor':
|
||||||
tradingViewStyle.short,
|
tradingViewStyle.short,
|
||||||
'mainSeriesProperties.candleStyle.wickUpColor': tradingViewStyle.long,
|
'mainSeriesProperties.candleStyle.wickUpColor': tradingViewStyle.long,
|
||||||
'mainSeriesProperties.candleStyle.wickDownColor':
|
'mainSeriesProperties.candleStyle.wickDownColor':
|
||||||
tradingViewStyle.short,
|
tradingViewStyle.short,
|
||||||
|
|
||||||
'study_Overlay@tv-basicstudies.barStyle.upColor': 'blue',
|
'study_Overlay@tv-basicstudies.barStyle.upColor': 'blue',
|
||||||
'study_Overlay@tv-basicstudies.barStyle.downColor': 'blue',
|
'study_Overlay@tv-basicstudies.barStyle.downColor': 'blue',
|
||||||
|
|
||||||
'study_Overlay@tv-basicstudies.lineStyle.color': 'blue',
|
'study_Overlay@tv-basicstudies.lineStyle.color': 'blue',
|
||||||
|
|
||||||
'study_Overlay@tv-basicstudies.areaStyle.color1': 'blue',
|
'study_Overlay@tv-basicstudies.areaStyle.color1': 'blue',
|
||||||
'study_Overlay@tv-basicstudies.areaStyle.color2': 'blue',
|
'study_Overlay@tv-basicstudies.areaStyle.color2': 'blue',
|
||||||
'study_Overlay@tv-basicstudies.areaStyle.linecolor': 'blue',
|
'study_Overlay@tv-basicstudies.areaStyle.linecolor': 'blue',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
tv.onChartReady(() => {
|
tv.onChartReady(() => {
|
||||||
@ -198,5 +188,4 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue
Block a user