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 DannyP96, 05-18-2026, 02:38 PM
|
1 response
27 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
117 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
69 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
226 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
414 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|

Comment