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 SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
54 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
25 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
17 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
23 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
24 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment