Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Accumulation Distribution %
Collapse
X
-
kzuschlag, may we have some feedback on this one. Is the code what you expected? Have you had any funny problems running the indicator? Can we post it to the file sharing section?Originally posted by kzuschlag View Post
-
The attached is a direct coding of what you specified. It is just a quick-and-dirty piece of coding with no error-checking. See if it does what you want, after which I will decide if I even need to put any kind of error-checking or limit filter on the plot.Originally posted by kzuschlag View PostAfter going back into the book the formula Bollinger lists is:
10-day sum of [(close-open) / (high-low) * volume] / 10-day sum of volume.
bolded is the part I think I forgot to mention. Thanks for your help koganam! I really appreciate it.
Attached Files
Leave a comment:
-
After going back into the book the formula Bollinger lists is:
10-day sum of [(close-open) / (high-low) * volume] / 10-day sum of volume.
bolded is the part I think I forgot to mention. Thanks for your help koganam! I really appreciate it.
Leave a comment:
-
That pseudocode as written cannot compile because you have introduced an ambiguous closing bracket and so the expression does not make sense. Now that you have a idea of the formula, describe in English what the requirement is. Are you simply trying to divide the current value (as defined in the original file), by the 10-day sum of volume ?I want to basically do this:
AD.Set((CurrentBar == 0 ? 0 : AD[1]) + (High[0] != Low[0] ? (((Close[0] - Low[0]) - (High[0] - Close[0])) / (High[0] - Low[0])) * Volume[0] / 10-day sum of volume) : 0));
Leave a comment:
-
Thanks for your quick reply. I'm still a little confused on what exactly you are saying. Would you mind basically writing the exact code I would need to enter? I'm a complete noob at NinjaScript as you can probably tell.Originally posted by koganam View PostRemember to check for "dblCumulative10DayVolume == 0", and handle it appropriately. I cannot tell you how many times that I have come to grief for not thinking about that one.Code:double dblCumulative10DayVolume = SUM(Volume, 10)[0];

Leave a comment:
-
Originally posted by kzuschlag View PostI'm wanting to normalize my accumulation distribution indicator over a 10 day period but I'm having a tough time adding the tiny bit of code necessary. Hoping any of your experienced NinjaScript users can help me out.
Currently ADL has the code:
AD.Set((CurrentBar == 0 ? 0 : AD[1]) + (High[0] != Low[0] ? (((Close[0] - Low[0]) - (High[0] - Close[0])) / (High[0] - Low[0])) * Volume[0] : 0));
I want to basically do this:
AD.Set((CurrentBar == 0 ? 0 : AD[1]) + (High[0] != Low[0] ? (((Close[0] - Low[0]) - (High[0] - Close[0])) / (High[0] - Low[0])) * Volume[0] / 10-day sum of volume) : 0));
bold is what I added. This indicator is talked about in John Bollinger's book in case any of you were curious.Remember to check for "dblCumulative10DayVolume == 0", and handle it appropriately. I cannot tell you how many times that I have come to grief for not thinking about that one.Code:double dblCumulative10DayVolume = SUM(Volume, 10)[0];
Leave a comment:
-
Accumulation Distribution %
I'm wanting to normalize my accumulation distribution indicator over a 10 day period but I'm having a tough time adding the tiny bit of code necessary. Hoping any of your experienced NinjaScript users can help me out.
Currently ADL has the code:
AD.Set((CurrentBar == 0 ? 0 : AD[1]) + (High[0] != Low[0] ? (((Close[0] - Low[0]) - (High[0] - Close[0])) / (High[0] - Low[0])) * Volume[0] : 0));
I want to basically do this:
AD.Set((CurrentBar == 0 ? 0 : AD[1]) + (High[0] != Low[0] ? (((Close[0] - Low[0]) - (High[0] - Close[0])) / (High[0] - Low[0])) * Volume[0] / 10-day sum of volume) : 0));
bold is what I added. This indicator is talked about in John Bollinger's book in case any of you were curious.Tags: None
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
574 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
332 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Leave a comment: