Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
indicator values for non-daily bars not consistent with daily bars?
Collapse
X
-
Thanks Chelsea.
However, at this time I am avoiding, if possible, messing with charts. If I can't do this in the Strategy Analyzer I will forgo it for now because it is not all that important.
-
Hi joemiller,
Please take a look at the attached sample strategy code and run the strategy in a chart with the databox open.
This strategy adds the SMA. The SMA sets a plot. The plot is shown in the data box.Attached Files
Leave a comment:
-
The suggested link says
'This technique has limited functionality. It will NOT work for charts in the Strategy Analyzer during backtesting, but it will work on real-time charts.'
However, I am working with analyzer backtesting charts so it appears I should not spend time trying to learn how to use the technique described in the link?
If so, if what I was trying to do will not work in a strategy, can I generate the display of the indicator in the Data Box by doing it somehow from the indicator code?
Leave a comment:
-
Hello joemiller,
Strategies do plots a little different than indicators.
The Value object will not be available.
Please take a look at the SampleStrategyPlot reference sample that shows how to accomplish this.
http://www.ninjatrader.com/support/f...ead.php?t=6651
Let me know if you'd like any assistance getting that working.
Leave a comment:
-
Add(joeXXOindicator(1));
is in the initialize region of my strategy
when I add
Value.Set(joeXXOindicator(1)[0]);
to the OnBarUpdate region I get an error message saying Value is undefined?
Must I define Value somewhere?
Leave a comment:
-
Hi joemiller,
Plots show up in the data box. If you'd like a value in the databox, set a plot to this value.
For example:
protected override void Initialize()
{
Add(new Plot(Color.Orange, "Plot0"));
}
protected override void OnBarUpdate()
{
Value.Set(SMA(15)[0]);
}
This would plot the SMA(15) in the data box.
Leave a comment:
-
Thanks Chelsea,
I am busily coding debug statements... what fun it is.
If doable, how can I make the value of an indicator appear in the Data Box?
Leave a comment:
-
Hello joemiller,
Day bars are pre-shaped by the broker and have the instrument's session template forced applied. This cannot be overridden.
Instead, using 1440 minute bars is a substitute for allowing the session template to be changed and still have a "day" bar.
If you are using the Forex template with a day bar, this should start and end at 17:00.
Leave a comment:
-
The Time frame Session template field is not present in the Strategy Analyzer Backtest slide out control panel for day bars. Could that possibly have any significance in the indicator discrepancies I am seeing for day bars vs minute bars? Like maybe time 0000 is used for day bar calculations and time 1700 for minute bars?Last edited by joemiller; 08-06-2013, 05:34 PM.
Leave a comment:
-
Hi joemiller,
I can confirm the redlineTomorrow is different for the daily at 5:00 PM on 5/8 (1.2905) and the 6 hour at 5:00 PM on 5/8 (1.3101).
I recommend you print the values of all variables you are using on the indicator to see which value is different.
Also, be sure the get bar call is returning the same bar.
Let me know if you are able to track down where they are different.
Leave a comment:
-
The session template is now correctly specified to be ‘Forex’, as it formerly was before I created all this confusion.
Attached are indicator and strategy files and two output window files - one for Daily bars and one for 6 hour bars.
Output window file comparison demonstrates, I think, that indicator calculations for non-daily bars are not the same as for daily bars?
Leave a comment:
-
Hi joemiller,
There is Forex template that trades Sun - Thurs, 5PM - 5PM.
You can also create a custom session template with the days and hours you specify.
Please take a look at this tutorial video.
http://www.ninjatrader.com/support/m...n-Template.htm
Also, here is a link to the help guide on the Session Manager.
http://www.ninjatrader.com/support/h...on_manager.htm
Leave a comment:
-
thanks Chelsea.
Is there only one five day template [ie] is there a special one for the Forex or is that the only one I can use to filter out weekends for the Forex ?
Leave a comment:
-
Hello joemiller,
The hours an instrument is open (and the session break time) is controlled by the session template.
If you are using the Default 24/5 template, the session will begin and end at 24:00 and not 17:15.
Please let me know which instrument you are using and which session template you have selected.
Leave a comment:
-
best I can remember, the 0000, 0600, 1200, 1800/1700, 2300, 0500, 1100 issue did not appear until this last go-round. as you know, I'm sure, the forex day starts at 5:15pm in my eastern time zone, ending at 5pm the next day. Monday is defined as Sunday, 1715 to Monday 1700. I was pleased and impressed that NT therefore was giving me those kind of hourly bars until I sent stuff to you. I may have screwed up some code and/or controls somewhere? I will restore to my old files and run them again to check on my memory of the situation [ie] whether I was being presented with a day whose first bar was 1700 hours instead of midnight.
However, I believe what I just sent to you demonstrates the indicator plot discrepancy.
I made the bars 6 hours rather than 1 hour or 1 minute for ease of outlook file comparison.
Leave a comment:
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
60 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
148 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
97 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
284 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Leave a comment: