Do I need to modify the SMA source code and start from scratch, or is there a trick?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
SMA of Midpoint
Collapse
X
-
Do you just want to plot this on a chart or use it in another indicator/strategy?
If on a chart, just add the system SMA indicator and set the price type property to "Median" which is (H+L)/2.
If you want to use it in another strategy/indicator, just call the method like:
SMA(Median, 20)[0]
This would be the value of the current bar 20 period SMA of Median prices.RayNinjaTrader Customer Service
Comment
-
SMA of Midpoint
Median it is. I read, and read (the documentation) and yet I miss the obvious.
Thanks guys
Originally posted by NinjaTrader_Ray View PostDo you just want to plot this on a chart or use it in another indicator/strategy?
If on a chart, just add the system SMA indicator and set the price type property to "Median" which is (H+L)/2.
If you want to use it in another strategy/indicator, just call the method like:
SMA(Median, 20)[0]
This would be the value of the current bar 20 period SMA of Median prices.
Comment
-
SMA of Midpoint - continued
This is continuation of my previous dumb post. Though I think this question is harder.
I have an histogram oscillator which is SMA(Median, 5)[0] - SMA(Median, 34)[0]
I want to create a second histogram which is the above indicator MINUS the 5 period SMA of the above indicator. In other words the input is the above histogram, not any standard dataseries. Do I need to clone and modify the SMA formula ? I am also thinking brute force calculation in a function (since its an SMA).
Originally posted by nybangali View PostMedian it is. I read, and read (the documentation) and yet I miss the obvious.
Thanks guys
Comment
-
Give this a try. I believe it should work.
Leave your current SMA(Median, 5)[0] - SMA(Median, 34)[0] indicator alone and program another indicator to get your second histogram. Lets say your current indicator is titled SMAMedian. To achieve what you want you would proceed with a new indicator in the same fashion as your current indicator and create a histogram with the calculation of SMAMedian[0] - SMA(SMAMedian, 5)[0].Josh P.NinjaTrader Customer Service
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