feat: kline data

This commit is contained in:
ding 2021-11-23 11:25:44 +08:00
parent e2aef3912c
commit c4b4f86741

View File

@ -95,88 +95,78 @@ export default {
theme: 'Dark',
favorites: {
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: [ //
'volume_force_overlay',
'left_toolbar',
'timeframes_toolbar',
'header_symbol_search',
'header_compare',
// 'header_fullscreen_button',
'header_widget',
// 'use_localstorage_for_settings',
'save_chart_properties_to_local_storage',
// 'header_chart_type',
// 'display_market_status',
'symbol_search_hot_key',
'compare_symbol',
'border_around_the_chart',
'remove_library_container_border',
'symbol_info',
// 'header_interval_dialog_button',
// 'show_interval_dialog_on_key_press',
'volume_force_overlay',
// 'header_resolutions',
// 'legend_context_menu',
// new
'symbol_info',
'pane_context_menu',
'timeframes_toolbar',
'header_symbol_search',
'header_compare',
// 'header_fullscreen_button',
'header_widget',
// 'use_localstorage_for_settings',
'save_chart_properties_to_local_storage',
// 'header_chart_type',
// 'display_market_status',
'symbol_search_hot_key',
'compare_symbol',
'border_around_the_chart',
'remove_library_container_border',
'symbol_info',
// 'header_interval_dialog_button',
// 'show_interval_dialog_on_key_press',
'volume_force_overlay',
// 'header_resolutions',
// 'legend_context_menu',
// new
'symbol_info',
'pane_context_menu',
],
enabled_features: [ //
'hide_left_toolbar_by_default',
'pane_context_menu',
'hide_last_na_study_output',
'dont_show_boolean_study_arguments',
'hide_left_toolbar_by_default',
'pane_context_menu',
'hide_last_na_study_output',
'dont_show_boolean_study_arguments',
],
overrides: {
'paneProperties.background': tradingViewStyle.bg,
'symbolWatermarkProperties.transparency': 85,
'scalesProperties.backgroundColor': '#151a1e',
'scalesProperties.textColor': '#888',
overrides: {
'paneProperties.background': tradingViewStyle.bg,
'symbolWatermarkProperties.transparency': 85,
'scalesProperties.backgroundColor': '#151a1e',
'scalesProperties.textColor': '#888',
'paneProperties.vertGridProperties.color': tradingViewStyle.grid,
'paneProperties.horzGridProperties.color': tradingViewStyle.grid,
'paneProperties.crossHairProperties.color':
tradingViewStyle.crosshair,
'scalesProperties.lineColor': tradingViewStyle.lineColor,
'symbolWatermarkProperties.color': 'rgba(0, 0, 0, 0)',
'paneProperties.vertGridProperties.color': tradingViewStyle.grid,
'paneProperties.horzGridProperties.color': tradingViewStyle.grid,
'paneProperties.crossHairProperties.color':
tradingViewStyle.crosshair,
'scalesProperties.lineColor': tradingViewStyle.lineColor,
'symbolWatermarkProperties.color': 'rgba(0, 0, 0, 0)',
'mainSeriesProperties.style': 1,
'mainSeriesProperties.style': 1,
// Candles styles
'mainSeriesProperties.candleStyle.upColor': tradingViewStyle.long,
'mainSeriesProperties.candleStyle.downColor': tradingViewStyle.short,
'mainSeriesProperties.candleStyle.drawWick': true,
'mainSeriesProperties.candleStyle.drawBorder': true,
'mainSeriesProperties.candleStyle.borderColor': '#C400CB',
'mainSeriesProperties.candleStyle.borderUpColor':
tradingViewStyle.long,
'mainSeriesProperties.candleStyle.borderDownColor':
tradingViewStyle.short,
'mainSeriesProperties.candleStyle.wickUpColor': tradingViewStyle.long,
'mainSeriesProperties.candleStyle.wickDownColor':
tradingViewStyle.short,
// Candles styles
'mainSeriesProperties.candleStyle.upColor': tradingViewStyle.long,
'mainSeriesProperties.candleStyle.downColor': tradingViewStyle.short,
'mainSeriesProperties.candleStyle.drawWick': true,
'mainSeriesProperties.candleStyle.drawBorder': true,
'mainSeriesProperties.candleStyle.borderColor': '#C400CB',
'mainSeriesProperties.candleStyle.borderUpColor':
tradingViewStyle.long,
'mainSeriesProperties.candleStyle.borderDownColor':
tradingViewStyle.short,
'mainSeriesProperties.candleStyle.wickUpColor': tradingViewStyle.long,
'mainSeriesProperties.candleStyle.wickDownColor':
tradingViewStyle.short,
'study_Overlay@tv-basicstudies.barStyle.upColor': 'blue',
'study_Overlay@tv-basicstudies.barStyle.downColor': 'blue',
'study_Overlay@tv-basicstudies.barStyle.upColor': '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.color2': 'blue',
'study_Overlay@tv-basicstudies.areaStyle.linecolor': 'blue',
},
'study_Overlay@tv-basicstudies.areaStyle.color1': 'blue',
'study_Overlay@tv-basicstudies.areaStyle.color2': 'blue',
'study_Overlay@tv-basicstudies.areaStyle.linecolor': 'blue',
},
})
tv.onChartReady(() => {
@ -198,5 +188,4 @@ export default {
</script>
<style scoped>
</style>