I am looking for help on how to plot EMA Envelope line from within an indicator script in NT 8 environment.
I had a NT7 indicator that worked fine with the following:
Under initialize:
Add(new Plot(new Pen(Color.Cyan, 2), "Plot21Up" )); Plots[0].Pen.DashStyle = DashStyle.Dash;
Under OnBarUpdate:
Plot21Up.Set(MAEnvelopes(newPrcnt,1,21).Upper[0]);
This was working fine.
Moving to NT8, I converted it to the following:
Under State.SetDefaults:
AddPlot(new Stroke(Brushes.Cyan), PlotStyle.Line,"Plot21Up"); Plots[0].DashStyleHelper = DashStyleHelper.Dash;
Under OnBarUpdate:
Plot21Up.Set(MAEnvelopes(newPrcnt,1,21).Upper[0]);
The .Set is not recognized anymore.
I tried the following and it is not working as well:
Plot21Up = MAEnvelopes(newPrcnt,1,21).Upper[0];
nor
Plots[0] = MAEnvelopes(newPrcnt,1,21).Upper[0];
Thank You
Comment