Is there a shortcut method I can use to reset a dataseries back to zero after it's created and used. I would like to do this in between bar updates.
Size:
Color:
In the course of thinking about it, this is what I came up with. Does this seem appropriate? I guess other members would be interested as well.
CODE:
Please log in to see this code.
Size:
Color:
Yes this should work. Among the other options are assigning something like Close-Close to your AnotherSeries, or assigning zero to each bar of the DataSeries in a loop.
Size:
Color:
It's not ideal and will only work once. When you assign AnotherSeries to ZeroFilled, they point to the same series reference -
CODE:
Please log in to see this code.
If you want a fresh series, just use the "new" operator again.
Size:
Color:
Wow, thanks. I was seeing some strange behavior and did not understand why. Probably because of this. I guess in the future I should write a little program and test it first before just assuming it will work.
Size:
Color:
Hint: you might want to use LINQPad to test code snippets.
Size:
Color: