The logic in @BarTypes picks the volume for AddBar() like so:
isFirstNewBar ? volume : 1,
... and I guess using 1 for all the empty bars is to avoid poorly-written indicators crashing on 0-volume bars? I don't really care about that part... but "volume" should really not go to the firstNewBar, and I think the logic should change so that it goes to the last bar Ninja has to build.
The screenshot shows an example of the issue if the description above is not clear. Let me know if there's any other information you need. As you can see in my example, the misplaced volume can be sizeable, so people that track volume by price on range bars would appreciate it if this were addressed.
Thanks!
Richard
Comment