When two HMA are rising they color the candles blue, when they are falling they color the candles red and when they aren't going in the same direction they are white?
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
help
Collapse
X
-
Hello,
Thank you for the post.
While our support can not program items for you, we can provide resources to help you learn if you would like to develop items yourself. If you would like further information to learn how to do this, please let me know. Otherwise if you are looking for a developer I could have our business development department reach out to you for third party resources.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
Hello,
Thank you for the reply.
The easiest way to get started would be to create a new empty indicator, you can do this by going to Tools -> New NinjaScript -> Indicator. Because you are only trying to color bars, you could remove the input MyInput0 while going through the new indicator wizard. Also you can remove the Plot0 in the wizard. Finally click next until you can finish the wizard and a new file opens.
The most simple example of a Rising and Falling condition would be in this helpguide document: http://ninjatrader.com/support/helpG...sub=plotcolors
This sample changes the Plot color of the indicator which is almost what you want already, you just need to re form the sample to change the BarColor instead.
To change Candle colors, you would use BarColor: http://ninjatrader.com/support/helpG...htsub=barcolor
To combine the two samples, you would use the conditions of rising/falling from the first sample and the BarColor property from the second. In this case, you would also need to replace check the HMA indicator.
for the HMA you can find its syntax here: http://ninjatrader.com/support/helpG...ghlightsub=hma
the syntax would look like the following:
Code:if (Rising(HMA(20)) BarColor = Color.Magenta; else if (Falling(HMA(20)) BarColor = Color.Purple;
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Comment
-
Good. Now you can use this indicator to open it and look at and read the code. Then I suggest you look for the "4" and "7" and change them in the code to the specific periods you want to actually use. Follow NT's instructions of how "to compile" and close/save the file.
Anyway, that's just my humble suggestion if you want to get into coding.
sandman
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by CortexZenUSA, Today, 12:53 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:53 AM
|
||
Started by CortexZenUSA, Today, 12:46 AM
|
0 responses
1 view
0 likes
|
Last Post
by CortexZenUSA
Today, 12:46 AM
|
||
Started by usazencortex, Today, 12:43 AM
|
0 responses
5 views
0 likes
|
Last Post
by usazencortex
Today, 12:43 AM
|
||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
168 responses
2,265 views
0 likes
|
Last Post
by sidlercom80
Today, 12:05 AM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
3 responses
11 views
0 likes
|
Last Post Yesterday, 11:58 PM |
Comment