Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Simple conversion from NT7 does not work
Collapse
X
-
Hello newbe17,
The NinjaTrader 7 chart is 3 second 03-21 chart the NinjaTrader 8 chart is a 1 minute 09-21 chart. Different data will produce different results.
Further, in NinjaTrader 7 when no value is set, the close price is used instead which can change the calculations. In NinjaTrader 8 when no value is set a 0 is returned.
Use prints to understand the behavior. Print the time and print all values used for the calculations being set to that plot.
For example where DownTrend is set:
Below is a link to a forum post that demonstrates using prints to understand behavior.Code:DownTrend[0]=Low[0]-TickSize; Print(string.Format("{0} | Low[0]: {1}, TickSize: {2}, Low[0]-TickSize: {3}", Time[0], Low[0], TickSize, Low[0]-TickSize));
https://ninjatrader.com/support/foru...121#post791121Chelsea B.NinjaTrader Customer Service
-
Then how do I get the same values in NT8 as in NT7?Originally posted by NinjaTrader_ChelseaB View PostHello newbe17,
Further, in NinjaTrader 7 when no value is set, the close price is used instead which can change the calculations. In NinjaTrader 8 when no value is set a 0 is returned.
Code:if (DownTrend.IsValidDataPoint(1)) _trend[0]=(Close[0] > DownTrend[1]); else _trend[0]=(Close[0] > Close[1]);
Last edited by newbe17; 07-21-2021, 04:52 PM.
Comment
-
Hello newbe17,
Start by using prints to confirm what is causing differences. Print the time of the bar and all values involved with that plot. Address the value that is different.
Use <Series>.IsValidDataPoint() to check if a value has been set, and choose what value to use when no value is set.
Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
77 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
40 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
63 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
63 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment