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 GussJ, 03-04-2020, 03:11 PM
|
16 responses
3,279 views
0 likes
|
Last Post
by Leafcutter
Today, 04:14 PM
|
||
Started by WHICKED, Today, 12:45 PM
|
2 responses
19 views
0 likes
|
Last Post
by WHICKED
Today, 03:36 PM
|
||
Started by Tim-c, Today, 02:10 PM
|
1 response
8 views
0 likes
|
Last Post Today, 02:52 PM | ||
Started by Taddypole, Today, 02:47 PM
|
0 responses
5 views
0 likes
|
Last Post
by Taddypole
Today, 02:47 PM
|
||
Started by chbruno, 04-24-2024, 04:10 PM
|
4 responses
51 views
0 likes
|
Last Post
by chbruno
Today, 02:38 PM
|
Comment