- ago
Is there a way to add a Time Series line to an Indicator Base pane. In WL 6 we had a pane parameter that allowed adding a non indicator line to an indicator line pane.
0
645
Solved
2 Replies

Reply

Bookmark

Sort
- ago
#1
Like many other chart drawing methods, DrawLine supports being called with optional paneTag parameter to specify the pane it will be plotted in:
CODE:
string paneTag = "Price"

Check out the QuickRef sample code (see instruction in the other post you made today) and note the "Price" string:
CODE:
DrawLine(trough2.PeakTroughIndex, trough2.Value, trough1.PeakTroughIndex, trough1.Value, Color.Green, 2, LineStyles.Dotted, "Price", false, true);

When you create an indicator, you specify a paneTag also. Replace "Price" with that paneTag string.
0
Cone8
 ( 28.25% )
- ago
#2
Clarifying, just pass the .PaneTag property of the IndicatorBase to PlotTimeSeries. In this example, that would be _roc.PaneTag

CODE:
      IndicatorBase _roc;       TimeSeries _abs;        public override void Initialize(BarHistory bars) {          _roc = ROC.Series(bars.Close, 14);          _abs = _roc.Abs();          PlotIndicator(_roc);          PlotTimeSeries(_abs, "Abs(ROC)", _roc.PaneTag, Color.Red, PlotStyles.Histogram); }
1
Best Answer

Reply

Bookmark

Sort