Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Addseries
Collapse
X
-
A plot using AddPlot() is going to be displayed on the chart regardless of whether you are only assigning a value during a certain BarsInProgress index.
You could instead create a condition that checks if the Bars are monthly bars and set the plot's brush color to transparent to avoid seeing the plot visually.
Comment
-
Hello Gibranes,
I'm not sure what you mean regarding a variable.
Your original question is regarding a plot. When you add a plot to an indicator, you can't specify it only be 'drawn' or plotted to a specific added data series. You'll need to use the solution suggested of setting the plot's brushes to Transparent if you want to hide the plot for a specific time frame (monthly, weekly, etc).
Comment
-
I get this variable in monthly chart like this.
if (BarsPeriod.BarsPeriodType == BarsPeriodType.Month)//MONTHLY DATA ONLY
RT= (MRPerformance-Rate)/DMediaVo;
RT=0.64;
If I call it in weekly chart its value is
RT=0;
How can I make it RT=064 on the weekly chart?
Comment
-
Hello,
Are you meaning within the same instance of a script?
BarsPeriod is for the primary Bars object only. So if you are only defining the variable when the primary bars object is BarsPeriodType.Month, you'll only have that information when the primary bars object is a monthly bar.
You would also need to define the variable when the BarsPeriodType is BarsPeriodType.Weekly, if you would to obtain a certain value when the primary bars object is a weekly bar.Last edited by NinjaTrader_Gaby; 10-16-2024, 01:31 PM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
571 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
330 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
548 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
548 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment