mjj38
- ago
Can you provide an example of a custom indicator that uses the plotstyle of Bands?
0
243
Solved
5 Replies

Reply

Bookmark

Sort
- ago
#1
Bands aren't different from any other example indicators. You define the plot style and obviously target the price pane...

CODE:
public override PlotStyles DefaultPlotStyle => PlotStyles.Bands; public override string PaneTag => "Price";

...and if you wish to plot the companion band, return its class name in Companions. In this example, here's how you do it from "MyBandUpper" (vice versa for "MyBandLower"):

CODE:
//return companion indicators public override List<string> Companions { get { List<string> c = new List<string>(); c.Add("MyBandLower"); return c; } }
1
Best Answer
mjj38
- ago
#3
Thanks Eugene,
How do I set the shading / opacity between the bands?
0
Glitch8
 ( 12.08% )
- ago
#4
The bands are provided a hard coded default opacity, which can be modified by the user when they plot the indicator.
1
mjj38
- ago
#5
Thank you
0

Reply

Bookmark

Sort