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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
87 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
47 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
66 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
69 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
58 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment