Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
slope of ema of indicator paints price bars
Collapse
X
-
slope of ema of indicator paints price bars
I'd like to paint my price bars according to the slope of an ema which uses an indicator rather than price as its input. I have no programming experience--does this indicator exist somewhere already? Thank you.Tags: None
-
Hello bigriver,
Thank you for your inquiry.
I am not aware of an indicator that does this.
However, you would be able to utilize BarColor to change the color of the chart's bars: https://ninjatrader.com/support/help.../?barcolor.htm
You can also utilize the Slope() method call to obtain the slope of a line: https://ninjatrader.com/support/help...nt7/?slope.htm
We do have resources to help you begin creating NinjaScript Strategies/Indicators.
The best way to begin learning NinjaScript is to use the Strategy Wizard. With the Strategy Wizard you can setup conditions and variables and then see the generated code in the NinjaScript Editor by clicking the View Code button.
I'm also proving a link to a pre-recorded set of videos 'Strategy Wizard 301' and 'NinjaScript Editor 401' for you to view at your own convenience.
Strategy Wizard 301
NinjaScript Editor 401
There are a few Sample Automated Strategies which come pre-configured in NinjaTrader that you can use as a starting point. These are found under Tools--> Edit NinjaScript--> Strategy. You will see locked strategies where you can see the details of the code, but you will not be able to edit (you can though always create copies you can later edit via right click > Save as)
We also have some Reference samples online as well as ‘Tips and Tricks’ for both indicators and strategies:
Click here to see our NinjaScript Reference Samples
Click here to see our NinjaScript Tips
These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.
Further, the following link is to our help guide with an alphabetical reference list to all supported methods, properties, and objects that are used in NinjaScript.
Alphabetical Reference
We also have a few tutorials in our help guide for both Indicators and Strategies.
Indicator tutorials
Strategy tutorials
Please let me know if you would like me to forward you on over to our business development department. They can assist with connecting you to a NinjaScript consultant that can create this indicator for you if you wish to not program it yourself.Zachary G.NinjaTrader Customer Service
-
Something like that already exists.
Attached you will find a chart that colors the bars according to the slope of a moving average, which can be calculated from any input series.
(1) You start with an indicator. In this case I have selected the anaMomentum indicator, which is an enhanced version of the Momentum. The anaMomentum shows as a white plot.
(2) In a second step I have added the anaBollingerUniversal indicator. This indicator plots a moving average of the selected input series and adds standard deviation bands to the moving average. You can select between more than 30 different moving averages. On the chart I have applied an Adaptive Laguerre Filter to the anaMomentum indicator.
(3) The anaBollingerUninversal indicator colors the plot according to the slope of the moving average. There are three colors, green for upsloping, red for downsloping and yelllow for flat. The flatness criterion autoadjusts to volatility. Additionally, the indicator has a parameter where you can change the sensitivity of the degree of flatness. If you set this parameter to zero, you will only get two trend states, upsloping or downsloping.
(4) The indicator also has an option to paint the bars on the price panel according to the slope of the moving average.
Now, if you set the period of the moving average to 1, the paintbars will directly change colors depening on the slope of the indicator that you selected as input series for the anaBollingerUnversal indicator.
The indicator is available open source as a free download here:
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
574 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
332 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