Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
BUG: SMA[1] is correct with Historical data but incorrect with Realtime data
Collapse
X
-
-
Sorry I accidently posted a new message on an unrelated thread. so bringing Joshs reply back here.Originally posted by NinjaTrader_Josh View PostDavid,
You should not try to back set with 1 like that. SMA indicator does not take into account that you are changing historical values on its input series.
Worth noteing.
Because I'm calculating the duration of the bar. I can't calculate a value for Bar 0. Until it completes I don't know how long it will take to complete. So I can only set a value to bar [1].
Thanks for helping me understand. It is easy to write my own SMA calculation.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
579 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 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
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment