Do I need to modify the SMA source code and start from scratch, or is there a trick?
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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 kaywai, Today, 12:06 AM
|
1 response
15 views
0 likes
|
Last Post Today, 08:01 AM | ||
Started by Padan, Today, 02:02 AM
|
1 response
9 views
0 likes
|
Last Post Today, 07:56 AM | ||
Started by Mestor, Today, 03:15 AM
|
1 response
8 views
0 likes
|
Last Post Today, 07:41 AM | ||
Started by RaygunWizzle, Yesterday, 08:52 PM
|
1 response
9 views
0 likes
|
Last Post Today, 07:40 AM | ||
Started by Mestor, 03-10-2023, 01:50 AM
|
13 responses
315 views
0 likes
|
Last Post Today, 07:29 AM |
Comment