![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Oct 2007
Location: Tucson, AZ
Posts: 368
Thanks: 2
Thanked 2 times in 2 posts
|
Every other charting package I've used allows the Volume Bars to be color-coded based on Current Price compared to previous Price (e.g., at previous bar close). Ideally with support for three colors (<, ==, >)
It is a fairly basic function that I cannot find in NinjaTrader. Is it being added? If not how can it be coded? I am fairly good at pattern matching... |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2007
Location: , Florida, USA
Posts: 663
Thanks: 36
Thanked 7 times in 6 posts
|
This doesn't do everything that's in your screen shot, but it only took a couple of minutes to do and it's a start (see attached.)
|
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Oct 2007
Location: Tucson, AZ
Posts: 368
Thanks: 2
Thanked 2 times in 2 posts
|
KBJ, Thank you!!!!
That looks good. By reading the cs file, it looked like I could modify to get what I wanted... Changed up color to black, down to red, added a 3rd equal color of mediumOrchid (~light purple), and changed the test to reference [Price] Close instead of Volume. It looks good! I'll test it out over the next day or so... Thank you very much for your help -- getting started with something new can be a challenge initially. Appreciate the help |
|
|
|
|
The following user says thank you to Lost Trader for this post: |
|
|
|
#4 |
|
Senior Member
Join Date: Mar 2007
Location: , Florida, USA
Posts: 663
Thanks: 36
Thanked 7 times in 6 posts
|
Good job!
I was wondering when the purple bars were supposed to be drawn. I like it better this way. |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Oct 2007
Location: Tucson, AZ
Posts: 368
Thanks: 2
Thanked 2 times in 2 posts
|
Interesting, KBJ... Often, price bars are colored red if falling, green (or black) if rising. So I tend to associate
.... red volume with falling price and .... black (or green) volume with rising price. BTW, from reading the manual, CalculateOnBarClose = false; is the ONLY way to get intrabar updates -- which obviously I need on Volume bars. So does that mean I should add the stmt immediately before the closing bracket } of the protected override void Initialize() section as the very last stmt in that section, in order to make that the default? Finally, I need some extra Y-axis clear space over the Volume bars (so I could draw some lines) and that caused my 0 line to rise also -- now I have some wasted empty space underneath Volume (since Volume cannot be negative). Is there a way to instruct the software that this value (plot) should always keep 0 at the bottom of the panel? |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Mar 2007
Location: , Florida, USA
Posts: 663
Thanks: 36
Thanked 7 times in 6 posts
|
The statement "CalculateOnBarClose = false;" can be placed anywhere in the Initialize() method.
I don't know how to adjust the vertical space. |
|
|
|
|
|
#7 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
There may be some more advanced plot overriding techniques you can use to achieve it, but it would require a lot more advance programming then that of which we provide support for. Perhaps you could try clicking on the y-axis scale and dragging it up and down to adjust it?
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Color Volume Bars Indicator (Download) Version 5 Only | awuit | Indicator Development | 3 | 11-29-2007 04:25 PM |
| HMA (Hull Moving Average) color change | Mexie | Indicator Development | 13 | 10-21-2007 08:58 AM |
| How . . . do I change color of Ray . . . . | barrykish@comcast.net | Charting | 1 | 08-01-2007 02:24 PM |
| Momentum bars or Price Range Bars | Akros | Indicator Development | 7 | 06-10-2007 04:55 AM |
| How to make the price ladder stop moving when no change in price | Trinity | Miscellaneous Support | 1 | 08-02-2006 07:41 PM |