TradingView 分享
版本1.14.
interval: 1H和4H 要转化为60 240(分钟)
timeframe:1D 图表初始时间范围。
disabled_features: [
'left_toolbar', //左边菜单
'timeframes_toolbar', //底部时间栏
'volume_force_overlay', //防止他们重叠
'header_undo_redo', //撤销返回
'header_compare', //对比
'header_chart_type', // k线样式
'header_resolutions', // 头部时间
'header_symbol_search', //搜索
'header_screenshot', //截图
'use_localstorage_for_settings',
'edit_buttons_in_legend',//设置按钮
'property_pages', //属性页面
]
enabled_features: [
'adaptive_logo', //隐藏logo后面文字
'hide_last_na_study_output',//隐藏(n/a)
'dont_show_boolean_study_arguments', //隐藏 true/false 指标参数
'remove_library_container_border',//去掉边框
]
overrides: {
'paneProperties.topMargin': 16,//图表距顶部距离
'paneProperties.legendProperties.showLegend': false, //收起左上角 +
}
loading_screen: { //加载时候的颜色
backgroundColor: ‘#000’,
foregroundColor: ‘#000’
}
// 控制显示范围 1天内
var tvWidget = new TradingView.widget({...})
tvChart = tvWidget.activeChart()
var nowDay = Math.round(new Date() / 1000)
var yestoday = Math.round(new Date(new Date().getTime() - 24 * 60 * 60 * 1000) / 1000)
tvChart.setVisibleRange({ from: yestoday, to: nowDay })