TradingView 相关自定义参数配置

1,禁用自带的一些功能

disabled_features:[//开启图表功能的字符串文字允许将用户设置保存到本地存储

'header_symbol_search',//头部搜索

“header_widget_dom_node”,//隐藏头部组件

'source_selection_markers',//禁用系列和指示器的选择标记

“header_indicators”,//图标指标

'adaptive_logo',//移动端可以隐藏logo

'constraint_dialogs_movement',

'header_interval_dialog_button',

'show_interval_dialog_on_key_press',

'symbol_search_hot_key',

'study_dialog_search_control',

'display_market_status',

'header_chart_type',// k线样式

'header_compare',//图表对比

'header_undo_redo',//撤销返回

'header_screenshot',//截图

'volume_force_overlay',//防止他们重叠

'header_settings',//设置

'property_pages',//禁用所有属性页

'header_fullscreen_button',//全屏

“header_saveload”

'edit_buttons_in_legend',

'timeframes_toolbar',//下面的时间

'symbol_info',

'border_around_the_chart',

'main_series_scale_menu',

'star_some_intervals_by_default',

'datasource_copypaste',

'right_bar_stays_on_scroll',

'context_menus',

'go_to_date',

'compare_symbol',

'border_around_the_chart',

'timezone_menu',

'header_resolutions',// todo:przetestowac //头部的时间

'control_bar',// todo:przetestowac

'edit_buttons_in_legend',// todo:przetestowac

'remove_library_container_border',

]

eslint使用单引号

 

2,创建按钮

this.widget.createButton()

.attr('title','分时')

.on('click',(e)=> {

。this.widget.chart()setChartType(3); // 3代表类型分时,普通分钟按钮1 

this.widget.chart()。setResolution('1',()=> {// 1代表1分钟  

// console.log(“set resolution callback”);

});

})。append(()=> {

});

3,更改蜡烛图显示

覆盖:{

'paneProperties.background':'#162431',//蜡烛样式

'mainSeriesProperties.candleStyle.upC​​olor':'#64ae74',

'mainSeriesProperties.candleStyle.downColor':'#df5f61',

//烛心

'mainSeriesProperties.candleStyle.drawWick':是的,

//烛心颜色

'mainSeriesProperties.candleStyle.wickUpColor':'#64ae74',

'mainSeriesProperties.candleStyle.wickDownColor':'#df5f61',

//边框

'mainSeriesProperties.candleStyle.drawBorder':是的,

'mainSeriesProperties.candleStyle.borderUpColor':'#64ae74',

'mainSeriesProperties.candleStyle.borderDownColor':'#df5f61',

//网格

'paneProperties.vertGridProperties.style':0,

'paneProperties.horzGridProperties.color': '#262727',

'paneProperties.vertGridProperties.color':'#262727',

//坐标轴和刻度标签颜色

'scalesProperties.lineColor':'#252525',

'scalesProperties.textColor':'#8a8a8a',

'paneProperties.legendProperties.showLegend':false,

'paneProperties.topMargin':20,

//'paneProperties.bottomMargin“:5

},

具体颜色自己决定

 

custom_css_url:'chart.css',//引入外部css

toolbar_bg:'#222831',//工具栏背景颜色

loading_screen:{backgroundColor:'#162431',foregroundColor:'#162431'},//加载背景加载图标背景颜色没找到隐藏方式,这样隐藏

 

studies_overrides: {
    "volume.volume.color.0": "#00FFFF",  //第一根的颜色
    "volume.volume.color.1": "#0000FF",  //第二根的颜色
    "volume.volume.transparency": 70,    //透明度
    "volume.volume ma.color": "#FF0000", //波浪图颜色
    "volume.volume ma.transparency": 30, //波浪图透明度
    "volume.volume ma.linewidth": 5,    
    "volume.show ma": true,    //是否显示
    "volume.options.showStudyArguments": false,
    "bollinger bands.median.color": "#33FF88",
    "bollinger bands.upper.linewidth": 7
}

 

 

 

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值