I assume this should be possible unless it's something in the calculation of the Keltner channel that I'm not understanding. Any suggestions on how to accomplish this? thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Keltner channel offset
Collapse
X
-
Keltner channel offset
is there a reason the offset in the default NT Keltner channel cannot be set to <1 ? I know it does decimals because I've tried 1.25, 1.5, etc. I'm looking to have a tighter channel and would to try offsets such as .75 and .6
I assume this should be possible unless it's something in the calculation of the Keltner channel that I'm not understanding. Any suggestions on how to accomplish this? thanksTags: None
-
Hi ts888,
You are correct that the default Keltner channel can take doubles as the input for the offset. The reason the default Keltner channel indicator only allows numbers greater than one is attributed to this code segment here (located in the Properties region of the code):
Notice on the 'set' line the offsetMultiplier is equal to a minimum of 1. To change the indicator to accept smaller decimals I suggest you change the 1 to a 0.Code:[Description("How much to expand the upper and lower band from the normal offset")] [Category("Parameters")] [Gui.Design.DisplayNameAttribute("Offset multiplier")] public double OffsetMultiplier { get { return offsetMultiplier; } set { offsetMultiplier = Math.Max(1, value); } }
You are going to need to save the indicator as a different indicator name because the Keltner channel is a system indicator that does not allow for modifications.Code:[Description("How much to expand the upper and lower band from the normal offset")] [Category("Parameters")] [Gui.Design.DisplayNameAttribute("Offset multiplier")] public double OffsetMultiplier { get { return offsetMultiplier; } set { offsetMultiplier = Math.Max(0, value); } }Josh P.NinjaTrader Customer Service
-
thanks Josh !! really appreciate it. Have to ask a follow up question though because I'm almost worthless in ninjascript.......how do I save it as a different indicator? I found the line in the code and assumed I'd do a "Save As" or similar to get a different name but the save icon is grayed out because of being a system indicator like you say.Originally posted by Josh View PostHi ts888,
You are correct that the default Keltner channel can take doubles as the input for the offset. The reason the default Keltner channel indicator only allows numbers greater than one is attributed to this code segment here (located in the Properties region of the code):
Notice on the 'set' line the offsetMultiplier is equal to a minimum of 1. To change the indicator to accept smaller decimals I suggest you change the 1 to a 0.Code:[Description("How much to expand the upper and lower band from the normal offset")] [Category("Parameters")] [Gui.Design.DisplayNameAttribute("Offset multiplier")] public double OffsetMultiplier { get { return offsetMultiplier; } set { offsetMultiplier = Math.Max(1, value); } }
You are going to need to save the indicator as a different indicator name because the Keltner channel is a system indicator that does not allow for modifications.Code:[Description("How much to expand the upper and lower band from the normal offset")] [Category("Parameters")] [Gui.Design.DisplayNameAttribute("Offset multiplier")] public double OffsetMultiplier { get { return offsetMultiplier; } set { offsetMultiplier = Math.Max(0, value); } }
Comment
-
I did that and gave it new name. I then compiled and got successful message. However, I can't seem to access it in the indicators list to apply it to a chart. It is not there. Have looked through entire list. When I got back into "edit ninjascript" I can see it but for some reason it doesn't come up in the list to apply it to a chart. Is there another step I'm missing? Thanks.Originally posted by NinjaTrader_Ray View PostOpen the indicator, right click and press "Save As..."
I do know see 2 Keltner Channel indicators but not the one I named and neither of them allow the offset under 1 so those can't be them.Last edited by ts888; 10-07-2007, 08:49 AM.
Comment
-
ok, apparently it is in there but only shows the new name when I add the indicator so that was the confusion.Originally posted by ts888 View PostI did that and gave it new name. I then compiled and got successful message. However, I can't seem to access it in the indicators list to apply it to a chart. It is not there. Have looked through entire list. When I got back into "edit ninjascript" I can see it but for some reason it doesn't come up in the list to apply it to a chart. Is there another step I'm missing? Thanks.
I do know see 2 Keltner Channel indicators but not the one I named and neither of them allow the offset under 1 so those can't be them.
However, the change to the code didn't appear to accomplish the task as it still forces it back to a minimum value of 1 for the offset.
Comment
-
Originally posted by ts888 View Postok, apparently it is in there but only shows the new name when I add the indicator so that was the confusion.
However, the change to the code didn't appear to accomplish the task as it still forces it back to a minimum value of 1 for the offset.
actually everything working perfect now. Sorry for all the posts. Thanks for your help.
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