Thanks,
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Displaced SMA?
Collapse
X
-
Displaced SMA?
Can someone give me simple code line for: Displaced -3 of SMA(5) CrossAbove SMA(13)
Thanks,Tags: None
-
phillionair,
Unfortunately it is not simple to get this displacement value. You will need to generate your own DataSeries that keeps track of the displaced value and then call it when you want it.
Alternatively, you could try and make your own SMA indicator that does the displacement for you. You will need to replace all the Value.Set lines.
Take Value.Set(Input[0]) and replace it with Value.Set(3, Input[0]). Add the "3" into all of the other Value.Sets and see if that works out for you.Josh P.NinjaTrader Customer Service
-
Josh,Originally posted by NinjaTrader_Josh View Postphillionair,
Unfortunately it is not simple to get this displacement value. You will need to generate your own DataSeries that keeps track of the displaced value and then call it when you want it.
Alternatively, you could try and make your own SMA indicator that does the displacement for you. You will need to replace all the Value.Set lines.
Take Value.Set(Input[0]) and replace it with Value.Set(3, Input[0]). Add the "3" into all of the other Value.Sets and see if that works out for you.
Where can I find more info./details about Value.Set/Displace? The help guide did not help much.
Comment
-
phillionair,
Please check out the article on DataSeries. http://www.ninjatrader-support.com/H...iesObject.html
Please read the "Setting Values - DataSeries.Set() & DataSeries.Reset()" section.Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
21 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
121 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
175 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
92 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
134 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|

Comment