Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
VOL indicator - bar colors
Collapse
X
-
Hello rsmtrade,
This is pretty similar to the built in indicator VolomeUpDown. You can view code used for this by clicking Tools > Edit NinjaScript > Indicator > Select VolomeUpDown and click open.
The color change here is based on Open compared to Close prices. You can save a copy and make modifications. Right Click > Save as > provide a new name and then make your changes.
It might look something like this for comparisons to volume bars:
Code:if (CurrentBar < 1) return; if (Vol()[0] > Vol()[1]) { Values[0].Set(Volume[0]); Values[1].Reset(); } else { Values[1].Set(Volume[0]); Values[0].Reset(); }Ryan M.NinjaTrader Customer Service
-
Yeah, there can definitely be a bit of a learning curve initially. I would start at the link here and then work through the tutorials for custom indicator development. Tutorials are pretty basic and can get you up to speed on opening /closing brackets and the areas of code that you need to work in.
I had already coded that indicator in my first reply so I've attached it in this post if you would like.
You can delete what you have by clicking Tools > Edit NinjaScript > Indicator > highlight your indicator and click delete.
To Import the one I attached:
Download the attached file to your desktop
2. From the Control Center window select the menu File > Utilities > Import NinjaScript
3. Select the downloaded fileAttached FilesRyan M.NinjaTrader Customer Service
Comment
-
Yes, you would use the same principles as the first indicator and much of the same code.
See here for the reference sample on multi color plot indicators:
Code:if (CurrentBar < 1) return; if (VOL()[0] < VOL()[1]) { Values[0].Set(SMA(14)[0]); Values[1].Reset(); } else { Values[1].Set(SMA(14)[0]); Values[0].Reset(); }Last edited by NinjaTrader_RyanM1; 08-24-2010, 02:26 PM.Ryan M.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
93 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
48 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
31 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
34 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
69 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment