I am using additional data series and trying to plot different colors for isrising and isfalling for ema values for additional dataseries. But when I add the indicator, it plots based on the additional data series interval which is ok, but on live data/ market replay, it plots based on primary series on bar update. Now, I tried using BarsInProgress == 1, it does not plot based on additional data series, rather plots very weirdly. Can you pls advise ?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
AddPlot() plots differently
Collapse
X
-
AddPlot() plots differently
Hi,
I am using additional data series and trying to plot different colors for isrising and isfalling for ema values for additional dataseries. But when I add the indicator, it plots based on the additional data series interval which is ok, but on live data/ market replay, it plots based on primary series on bar update. Now, I tried using BarsInProgress == 1, it does not plot based on additional data series, rather plots very weirdly. Can you pls advise ?Tags: None
-
Hi asmmbillah, thanks for writing in.
When a plot is added there is a slot index for every bar of the primary series, not the secondary series. The plot is also scattered because the Renko bars are not time based. The value can be saved within BarsInProgress == 1, but the plot must be set withing BarsInProgress == 0.
Kind regards,
-ChrisL
-
thanks for your reply. in that case, as I am using calculate.onpricechange, I have tried isfirsttickofbar with barsinprogress == 1, but does not return anything ie, does not plot. any suggestion, as though the calculate is set to onpricechange, isfirsttickofbar should have worked with barsinprogresss == 1 to calculate and plot on primary series. But its not. any advice will be helpful.
Comment
-
Hi asmmbillah, thanks for your reply.
The plot must be set within the primary bar series for it to render on the chart properly. The code needs to behave like this:
double myValue;
if(BarsInProgress == 0)
{
Value[0] = myValue;
}
if(BarsInProgress == 1)
{
myValue = SomeValueFromSecondarySeries;
}
Kind regards,
-ChrisL
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
578 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment