Skip to content

Instantly share code, notes, and snippets.

@denistex
Created July 10, 2017 19:36
Show Gist options
  • Save denistex/6b519cfd4ef07bb3ebbedb955d433404 to your computer and use it in GitHub Desktop.
Save denistex/6b519cfd4ef07bb3ebbedb955d433404 to your computer and use it in GitHub Desktop.
Example of custom study meta info in Trading View Charting LIbrary
{
_metainfoVersion: 27,
isTVScript: false,
isTVScriptStub: false,
is_hidden_study: false,
defaults: {
styles: {
plot_0: {
linestyle: 0,
linewidth: 1,
plottype: 0,
trackPrice: false,
transparency: 35,
visible: true,
color: '#FF7F00'
},
plot_1: {
linestyle: 0,
linewidth: 1,
plottype: 0,
trackPrice: false,
transparency: 35,
visible: true,
color: '#0000FF'
},
plot_2: {
linestyle: 0,
linewidth: 1,
plottype: 0,
trackPrice: false,
transparency: 35,
visible: true,
color: '#0000FF'
}
},
precision: 4,
filledAreasStyle: {
fill_0: {
color: '#0000FF',
transparency: 90,
visible: true
}
},
inputs: {
in_0: 20,
in_1: 10,
in_2: false
}
},
plots: [{
id: 'plot_0',
type: 'line'
}, {
id: 'plot_1',
type: 'line'
}, {
id: 'plot_2',
type: 'line'
}],
styles: {
plot_0: {
title: 'Median',
histogramBase: 0,
joinPoints: false
},
plot_1: {
title: 'Upper',
histogramBase: 0,
joinPoints: false
},
plot_2: {
title: 'Lower',
histogramBase: 0,
joinPoints: false
}
},
description: 'Envelope',
shortDescription: 'Env',
is_price_study: true,
filledAreas: [{
id: 'fill_0',
objAId: 'plot_1',
objBId: 'plot_2',
type: 'plot_plot',
title: 'Plots Background'
}],
inputs: [{
id: 'in_0',
name: 'Length',
defval: 20,
type: 'integer',
min: 1,
max: 2000
}, {
id: 'in_1',
name: 'percent',
defval: 10,
type: 'float',
min: -1000000000000,
max: 1000000000000
}, {
id: 'in_2',
name: 'exponential',
defval: false,
type: 'bool'
}],
id: 'Envelope@tv-basicstudies-1',
scriptIdPart: '',
name: 'Envelope'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment