protected override void Initialize() { Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0")); Add(PeriodType.Day, 1); Overlay = true; } protected override void OnBarUpdate() { Plot0.Set(1); }
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Multi-Time Frame Indicator in Market Analyzer
Collapse
X
-
Multi-Time Frame Indicator in Market Analyzer
I was trying to have the value from one of my multi-time frame indicators show up in a market analyzer column but the value of the indicator would not display. I created a test indicator using the wizard to see if I could just get a 1 to show up in the market analyzer. This worked successfully, but when I add the line "Add(PeriodType.Day, 1);" to Initialize() the value displayed in the market analyzer is now 0. I have the main data series set to 60 min data. Is it possible make this work? The code below produces a 0 in the indicator column when the main data series set to 60 min.
Code:Tags: None
-
-
Hello,
First thing that needs added is a bar check to make sure you have enough bars. This is important for daily data.
if(CurrentBars[0] < 5 && CurrentBars[1] < 5)
return;
Right before you Plot0.Set(1);
http://www.ninjatrader.com/support/h...urrentbars.htm
Let me know if I can be of further assistance.
Comment
-
Of course, thanks. I forgot to look in the log, the error message there always reminds me to add that line in. That also helped me understand what was happening with my original indicator. I simply needed to increase the "# of bars to look back" for my original indicator, I didn't have enough data loaded. I guess my confusion was in that they worked fine on my chart but not in the Market Analyzer.
Thanks again for the help and the extremely quick responses. I really appreciate it and I did also want to say that the support here is First Class.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Kensonprib, 04-28-2021, 10:11 AM
|
5 responses
191 views
0 likes
|
Last Post
by Hasadafa
Today, 10:19 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
11 responses
3,230 views
0 likes
|
Last Post Today, 08:07 PM | ||
Started by andrewtrades, Today, 04:57 PM
|
1 response
14 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
7 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
441 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
Comment