如何解决如何在下方移动自定义指标新窗格?
例如,我可以在 tradingview.com 处向下移动一些带有新窗格的指标,如下所示:
它适用于 tradingview.com 处的普通指标,但如果我想在我的本地主机开发环境中创建自定义指标 #Equity
:
__customIndicators = [
{
name: "Equity",metainfo: {
"_metainfoVersion": 40,"id": "Equity@tv-basicstudies-1","scriptIdPart": "","name": "Equity","description": "Equity","shortDescription": "Equity","is_hidden_study": true,"is_price_study": true,"isCustomIndicator": true,"plots": [{"id": "plot_0","type": "line"}],"defaults": {
"styles": {
"plot_0": {
"linestyle": 0,"visible": true,// Make the line thinner
"linewidth": 1,// Plot type is Line
"plottype": 2,// Show price line
"trackPrice": true,"transparency": 40,// Set the plotted line color to dark red
"color": "#880000"
}
},// Precision is set to one digit,e.g. 777.7
"precision": 1,"inputs": {}
},"styles": {
"plot_0": {
// Output name will be displayed in the Style window
"title": "Equity value","histogramBase": 0,}
},"inputs": [],},constructor: function() {
this.init = function(context,inputCallback) {
this._context = context;
this._input = inputCallback;
var symbol = "#EQUITY";
this._context.new_sym(symbol,PineJS.Std.period(this._context),PineJS.Std.period(this._context));
};
this.main = function(context,inputCallback) {
this._context = context;
this._input = inputCallback;
this._context.select_sym(1);
var v = PineJS.Std.close(this._context);
return [v];
}
}
}
];
上面创建的指标不能向下移动:
请注意,当我点击左上角的指标时,没有出现expect弹出菜单,所以我不知道如何将带有新窗格的自定义指标向下移动。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。