Thanks for any help.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Moving Average Differential indicator?
Collapse
X
-
Hello cmv727,
Thanks for your post.
Other than the MACD I'm not aware of an indicator that would show the differences between two moving averages.
Perhaps others in the community will offer suggestions.
If you wanted to create this yourself, we can assist you with links to learning Ninjascript to get you started.
Alternatively, we can also refer you to 3rd party programmers who could provide that service
-
Hello cmv727,
Thanks for your reply.
I'll add the links below.
Also, I created a starting point for you that you can copy and modify as you wish. As is it just determines the number of ticks difference between and SMA(10) and an SMA(20) and then prints that on the chart in the upper right corner. You can download and install the zipped file.
NinjaTrader's Ninjascript is written in C# so you may wish to search for on-line references for learning C# as this controls the syntax rules for Ninjascript.
If you would like to take on learning NinjaScript, we have a fully documented help guide which will help you get started.
All links below are publicly available.
The entire Alphabetical Reference can be found with the following link: https://ninjatrader.com/support/help..._reference.htm
Below are links to Reference Samples online as well as some Tips and Tricks for both indicators and strategies. These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.
Click here to see our NinjaScript Reference Samples:
Click here to see our NinjaScript Tips: https://ninjatrader.com/support/help...n-us/?tips.htm
The best way to begin learning NinjaScript is to use the Strategy Builder. With the Strategy Builder you can setup conditions and variables and then see the generated code in the NinjaScript Editor by clicking the View Code button. Please see the helpguide here: https://ninjatrader.com/support/help...gy_builder.htm
I'm also proving a link to a pre-recorded set of videos 'Strategy Builder 301' and 'NinjaScript Editor 401' for you to view at your own convenience.
Strategy Builder 301 - https://www.youtube.com/watch?v=HCyt...ZmVnauWXkWe0Nf
NinjaScript Editor 401 - https://www.youtube.com/watch?v=BA0W...ZmVnauWXkWe0Nf
If you are new to C#, to get a basic foundation for the concepts and syntax used in NinjaScript I would recommend this section of articles in our NT7 help guide first:
Here is a link to the Educational Resources section of the Help Guide to help you get started with NinjaScript: https://ninjatrader.com/support/help..._resources.htm
There is also a growing library of user-submitted custom indicators (100+) that can be downloaded from our support forum. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there: https://ninjatrader.com/support/foru...ks.php?catid=7
Last, I'm also sharing a link to another forum post that reviews how to use prints to understand behavior and debug a script when the behavior is unexpected. https://ninjatrader.com/support/foru...979#post510979Attached Files
Comment
-
Hey Paul, I've been using the ExampleMADifferences indicator and it's great, so thank you. Just wondering if there is a way to reference this indicator within the strategy builder? For example, entering a position when the indicator number is greater or less than a specific value. Thanks in advance.
Comment
-
Hello setardiffm,
Welcome to the NinjaTrader forums!
For an indicator to be visible in the Strategy Builder (or Market Analyzer) there must be a plot added with AddPlot() and a public Series<double> returning the Values[plot series index].
The support article below provides sample code.
Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
626 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
359 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 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
562 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
567 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment