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
bettervolume3 on bar close false issue
Collapse
X
-
bettervolume3 on bar close false issue
Trying to find out how to correct issue with this indicator. If you calculate on bar close to false the colors are not always correct when the bar closes. Example as in live bars are on say half the day, then you change to calculate of bar closes to true, a lot of bars change colors meaning something is not calculating correctly. Anybody else see this issue and how do I fix. I want the live color bars while the candle is forming but you can not trust that it is correct. ThanksTags: None
-
Hello pdcarpen,
Have you createad a script that is being applied to a chart that is setting BarColor?
Have you added prints to your script to see on what bars the conditions are true and when the color is being set?
Below is a link to a forum post that discusses using prints to understand behavior.
If so, please include the output from the prints so that we may assist in analyzing information in the prints.Chelsea B.NinjaTrader Customer Service
-
I downloaded bettervolume3 from the indicator forum on ninja. I have not changed anything or any codes. It says it corrected the on close function for nt7 but not seeing that to be the case. Not a coder so just would like to download it if I could. I will post pictures first is live color candles and second is after i refresh. Seem to work just fine on print on close of bar but does not work on false option.
1st photo is live color bars 2nd is after refresh. just from the circle to the right.
Comment
-
/*
Modified: Oct 14 2010
Modification: added logic to reset the Plots when the CalculateOnBarClose=false;
previously the bars would not paint correctly.
enjoy
Barry Taylor's Better Volume Indicator as described at
Coded for NinjaTrader by Alex Matulich, 2009-10-08, Unicorn Research Corporation.
This indicator optionally uses True Range rather than Range, it plots an exponential
moving average of the volume instead of simple moving average for efficiency,
and it optionally paints the price bars when BetterVolume2 indicates something
other than the normal color.
Watch for these at different stages of the market:
| Bottom | Start |Continue| Top | Start |Continue
| |uptrend|uptrend | |downtrend|downtrend
------------------+--------+-------+--------+--------+---------+---------
Volume Climax Up | | Yes | | Yes | | Yes red
Volume Climax Down| Yes | | Yes | | Yes | white/black
High Volume Churn | Yes | | | Yes | | green/blue
Climax + Hi Churn | Yes | | | Yes | | magenta
Low Volume | Yes | | Yes | Yes | | Yes yellow
-------------------------------------------------------------------------
This indicator works the same on daily or intraday bars. The original Tradestaion
code makes use of up volume and down volume data for intraday bars, and for daily
bars it calculates up volume and down volume from the relative positions of open,
high, low, and close. We use the latter method here, because NinjaTrader does not
provide up volume and down volume data.
*/
But seem still not to work correctly
Comment
-
Hello pdcarpen,
If you are using an indicator that was created by 3rd party and posted on the NinjaTrader forum (however, you linked a different website and not the NinjaTrader forum), and you wanting the script corrected, you need to contact the vendor or author that creates the script for assistance with its use, to report any issues with the script, or to ask for modifications.
If you are trying to correct this indicator yourself, you would need to debug the script by adding prints to understand the behavior.Chelsea B.NinjaTrader Customer Service
Comment
-
This was download from ninja forum indicators.. on the website. says ninja support staff helped with the fix was trying to find out what was fixed? As it is not fixed or am I missing something. The link to the forum for the indicator:
called bettervolume3
This is exactly the same as BetterVolume2 with a minor change to accomodate NT Version 7.
I take not credit for originality just corrected it to work in NT 7 when CalculateOnBarClose= false;
Also credit to Bretrand and other Ninja support staff for pointing me in the correct direction to fix this.
Any help would be great. Thank you
Comment
-
Hello pdcarpen,
Unfortunately, in the support department at NinjaTrader it is against our policy to create, debug, or modify code or logic for our clients. This is so that we can maintain a high level of service for all of our clients as well as our partners.
You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
If you are wanting to correct this script yourself, you would need to add prints to the script to understand the behavior so that changes can be made.
First, find the condition that is calling BarColor.
Then outside of that condition add a print with the time of the bar that prints all variables used in that condition.
Then include the output from the output window with your next post, and I can assist you in understanding the information.Chelsea B.NinjaTrader Customer Service
Comment
-
This is what I found in the code but really do not know what I am looking at. Thanks for the help so far.
// bc = bar color = index number of plot created in Initialize()
bool sameday = eod ? true : (Time[0].Day == Time[1].Day);
int bc = 0; // default 0 (normal volume bar)
if (cond1 || (cond11 && sameday)) bc = 1; //LowVol
if (cond2 || cond3 || cond8 || cond9 || ((cond12 || cond13 || cond18 || cond19) && sameday)) bc = 2; //ClimaxUp
if (cond4 || cond5 || cond6 || cond7 || ((cond14 || cond15 || cond16 || cond17) && sameday)) bc = 3; //ClimaxDown
if (cond10 || (cond20 && sameday)) bc = 4; //Churn
if (bc == 4 && (cond2 || cond3 || cond4 || cond5 || cond6 || cond7 || cond8 || cond9 || (cond12 || cond13 || cond14 || cond15 || cond16 || cond17 || cond18 || cond19) && sameday))
bc = 5; //ClimaxChurn
// plot stuff
Values[bc].Set(Volume[0]); //draw the volume bar we found
if (paintbars && bc > 0) BarColor = Plots[bc].Pen.Color; // paint the price bar
VolEMA.Set(vwt * (Volume[0] - VolEMA[1]) + VolEMA[1]); // plot average; faster than SMA
Comment
-
Hello pdcarpen,
There does appear to be a line of code that sets the BarColor.
if (paintbars && bc > 0) BarColor = Plots[bc].Pen.Color;
If you print the values, are these having unexpected values at unexpected times?
Print(string.Format("{0} | paintbars: {1} == true & bc: {2} > 0", Time[0], paintbars, bc));
What is the output you get from this print?
On which bar are you getting an unexpected color?Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Aviram Y, Today, 05:29 AM
|
0 responses
1 view
0 likes
|
Last Post
by Aviram Y
Today, 05:29 AM
|
||
Started by quantismo, 04-17-2024, 05:13 PM
|
3 responses
25 views
0 likes
|
Last Post Today, 05:23 AM | ||
Started by ScottWalsh, 04-16-2024, 04:29 PM
|
7 responses
34 views
0 likes
|
Last Post Today, 05:15 AM | ||
Started by cls71, Today, 04:45 AM
|
0 responses
6 views
0 likes
|
Last Post
by cls71
Today, 04:45 AM
|
||
Started by mjairg, 07-20-2023, 11:57 PM
|
3 responses
216 views
1 like
|
Last Post
by PaulMohn
Today, 04:22 AM
|
Comment