Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Enhanced On Balance Volume Indicator
Collapse
X
-
Originally posted by roonius View Post
-
Originally posted by T2020 View PostThe indicator updates on bar completion . I changed one statement like this :
CalculateOnBarClose = false; : ,but there must be something else the needs to changed ,maybe this : if (CalculateOnBarClose) : ??? Nope , lost
again .
Just set calculate on bar close to false in the indicators windows if you want it to update every tick.
Comment
-
Originally posted by Elliott Wave View PostWhat are you trying to do?
Just set calculate on bar close to false in the indicators windows if you want it to update every tick.
needed to be changed in the code .... ?Does it update every tick for you when you set it that way ?
Comment
-
-
Originally posted by roonius View PostHere you go
right at the beginning of a new bar occasionally ,but resumes normal working
almost immediately . Just something I'm leaving feed back on .
I wish i knew how to do this . I'd be adding moving averages to it , trying
certain period summations of the same formula . I could do all that on my
previous software , unfortunately it didn't have anything remotely as good as
the Ninja chart trader ,which I've come to rely on . Oh well . Thanks again .
Comment
-
Roonius,
I clipped this code from your indicator.
if (CurrentBar == 0)
{
if((High[0]-Low[0])!=0)
{
volUp.Set(Volume[0]*((High[0]-Open[0])/(High[0]-Low[0])));
volDn.Set(Volume[0]*((Open[0]-Low[0])/(High[0]-Low[0])));
} else
{
volUp.Set(0);
volDn.Set(0);
}
} else
if((High[0]-Low[0])!=0)
{
volUp.Set(volUp[1] + Volume[0]*((High[0]-Open[0])/(High[0]-Low[0])));
volDn.Set(volDn[1] + Volume[0]*((Open[0]-Low[0]) /(High[0]-Low[0])));
}
OBVplot.Set(volUp[0] - volDn[0]);
You have this exception in there twice:
if((High[0]-Low[0])!=0)
i don't see any exceptions if ((Open[0]-Low[0])were to equal zero.
It looks like it could pop with an infinite number.
What are your thoughts,
RJayLast edited by RJay; 12-16-2008, 02:41 PM.
Comment
-
Originally posted by rt6176 View PostRoonius,
I clipped this code from your indicator.
if (CurrentBar == 0)
{
if((High[0]-Low[0])!=0)
{
volUp.Set(Volume[0]*((High[0]-Open[0])/(High[0]-Low[0])));
volDn.Set(Volume[0]*((Open[0]-Low[0])/(High[0]-Low[0])));
} else
{
volUp.Set(0);
volDn.Set(0);
}
} else
if((High[0]-Low[0])!=0)
{
volUp.Set(volUp[1] + Volume[0]*((High[0]-Open[0])/(High[0]-Low[0])));
volDn.Set(volDn[1] + Volume[0]*((Open[0]-Low[0]) /(High[0]-Low[0])));
}
OBVplot.Set(volUp[0] - volDn[0]);
You mave this in there twice:
if((High[0]-Low[0])!=0)
i don't see any exceptions if ((Open[0]-Low[0])==0)
It looks like it could pop with an infinite number.
What are your thoughts,
RJay
The only divisor we have is High[0] - Low[0]Last edited by roonius; 01-08-2009, 08:39 PM.
Comment
-
Variable * 0 / Variable.
Punch it in a calculator and see what happens.
Comment
-
You covered (High - Low) but not (Open - Low)
Comment
-
Maybe your right and I just don't get it.
variable * 0 = What?
0 / Variable = What?
I thought this would make any equation explode.
Comment
-
Originally posted by rt6176 View PostMaybe your right and I just don't get it.
variable * 0 = What?
0 / Variable = What?
I thought this would make any equation explode.
0 / Variable = What? --- 0 as long as Variable != 0
You can do 0/Variable but can not Variable/0Last edited by roonius; 01-08-2009, 08:38 PM.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by TheWhiteDragon, 01-21-2019, 12:44 PM
|
4 responses
541 views
0 likes
|
Last Post
by PaulMohn
Today, 04:09 AM
|
||
Started by GLFX005, Today, 03:23 AM
|
0 responses
2 views
0 likes
|
Last Post
by GLFX005
Today, 03:23 AM
|
||
Started by XXtrader, Yesterday, 11:30 PM
|
2 responses
11 views
0 likes
|
Last Post
by XXtrader
Today, 03:07 AM
|
||
Started by Waxavi, Today, 02:10 AM
|
0 responses
7 views
0 likes
|
Last Post
by Waxavi
Today, 02:10 AM
|
||
Started by TradeForge, Today, 02:09 AM
|
0 responses
14 views
0 likes
|
Last Post
by TradeForge
Today, 02:09 AM
|
Comment