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
Volume bar color coding
Collapse
X
-
Volume bar color coding
How can I get the volume bars painted different colors based on the volume of the bar? I would like say 3 values, where the lowest value would paint a green candle, in between the lowest and middle yellow, between the last 2 values orange and above the 3rd value red candle. Is that possible?Tags: None
-
Hello axjurado,
For bars you can color them using an indicator.
An indicator could process the bar information and color the bars based on your condition. To check the volume in a condition you can do that like the following:
Code:if(Volume[0] > 0 && Volume[0] < 100) { }
Code:if(Volume[0] > 500) { }
JesseNinjaTrader Customer Service
-
I need to create an indicator based on the current bar volume compared to the previous bar volume. Basically paint Bar 0 if volume Bar1 < 50% of volume Bar 0.
Thank You, Jamie Stephens
Comment
-
Hello JamieHendrix,
Please open a new thread for any new questions you have about your own script. If you are having difficulty making that type of condition please ensure to include that so we know what specifically you needed help with.
To make a condition comparing volume between bars you would need to use BarsAgo. Every series has brackets at the end [0] which indicates the BarsAgo, 0 meaning the most recent bar. You would need a condition that compares the 0 bars ago volume against the 1 bars ago volume. Because you want to know 50% you also need to use some math there to divide the volume by 2 to get half its value.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bortz, 11-06-2023, 08:04 AM
|
47 responses
1,611 views
0 likes
|
Last Post
by aligator
Today, 07:22 PM
|
||
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
9 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
19 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
6 views
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
22 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
Comment