Can you provide an example of a custom indicator that uses the plotstyle of Bands?
Rename
Bands aren't different from any other example indicators. You define the plot style and obviously target the price pane...
...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:
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; } }
Thanks Eugene,
How do I set the shading / opacity between the bands?
How do I set the shading / opacity between the bands?
The bands are provided a hard coded default opacity, which can be modified by the user when they plot the indicator.
Thank you
Your Response
Post
Edit Post
Login is required