Any help would be greatly appreciated.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Band Around a Moving Average
Collapse
X
-
Band Around a Moving Average
I am trying to find an indicator that will create a band a certain number of pips above and below a moving average. For example: create a 89sma moving average and have an option to add a 20 pip band above or below.
Any help would be greatly appreciated.Tags: None
-
Unfortunately this would have to be done through programming a custom indicator. You could try one of these 3rd party NinjaScript Consultants here: http://www.ninjatrader.com/webnew/pa...injaScript.htmJosh P.NinjaTrader Customer Service
Comment
-
forrest:
go into the wizard: tools>newninjascript>new indicator
give it a name
check the overlay box
next
write
Period
where MyInput was
next
change
Plot0 to Avg
and name the next 2 plots Upr and Lwr
(feel free to play with the colors)
next
(you're not adding lines so)
next
finish
a new window with code will open up
find the line:
Avg.Set(Close[0]);
Upr.Set(Close[0]);
Lwr.Set(Close[0]);
change it to:
Avg.Set(SMA(period)[0]);
Upr.Set(SMA(period)[0]+20 * TickSize);
Lwr.Set(SMA(period)[0]-20 * TickSize);
click the compile button(or F5)
and you're set
also in the variables screen in the wizard you can add an Offset variable and replace the 20 with the variable in the code.
enjoy
Comment
-
-
Hello Forrest. I currently have the broker version of Ninja Trader which does not allow me to build custom indicators. Would you mind uploading this indicator to the "Indicator Sharing" forum? Thanks for your consideration.Originally posted by forrest View PostMike,
Worked perfectly Mike. Thank you for your help!
Forrest
Regards
Chuck
Comment
-
Maxreturn
Let's see if this works. I will try to attach here.Attached Files
Comment
-
Thanks Forrest but when I try to download the file has a ".cs" extension and only allows me to download as a Metaquotes 4 file. Is there a way for you to export it from within Ninja Trader as a "zip" file? Thanks for your consideration.Originally posted by forrest View PostLet's see if this works. I will try to attach here.
Regards
Chuck
Comment
-
I'm sure that's true Forrest but I have the broker's version of the software which does not allow me to create custom indicators.Originally posted by forrest View PostI will be glad to try. But I am not sure how to send a zip. If you know how I can send without deleting my copy please let me know. The reply above which goes through the steps to set-up this indicator takes no time at all.
Forrest
Regards
Chuck
Comment
-
maxreturn
Here you go. Thanks for the instructions. Apologize for taking so long..had to watch my two year old. Let me know if this does not work.
ForrestAttached Files
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
576 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
553 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