How do I set the PlotStyle for an indicator in a coded strategy when using a Custom PlotStyle? PlotStyles are set using an enum but the enum for the custom plotstyle enum (I believe) is only generated at build time.
Rename
The plan was you'd be able to assign the IndicatorBase.PlotName, but it looks like we never got to testing this case so it doesn't work currently. I enabled this to work in Build 16, so after that point you can use code like this. Replace "Histogram" with your plot style's Name property.
CODE:
public override void Initialize(BarHistory bars) { ROC r = ROC.Series(bars.Close, 10); r.PlotName = "Histogram"; PlotIndicator(r); }
Perfect. Thanks Glitch!
After setting the custom PlotStyle as demonstrated above, is there a way to access the plotstyle to modify the parameters? I have some custom parameters associated with the custom plotstyle I created.
You could put them into the source TimeSeries Cache and then access them from within the PlotStyle.
Your Response
Post
Edit Post
Login is required