Duplicate series
Author: Ben_Zurich
Creation Date: 7/4/2012 6:56 AM
profile picture

Ben_Zurich

#1
I realized that

CODE:
Please log in to see this code.


does not duplicate the seriesA into seriesB. seriesB is initialized to all zeroes. How to duplicate a series without looping through all the bars?
profile picture

Eugene

#2
Yes, this is for creating a new series - not for duplicating it. There are many methods to duplicate an object in C#, such as reflection, serialization or cloning but the simpest way is undoubtedly this:
CODE:
Please log in to see this code.

profile picture

Cone

#3
Careful.

CODE:
Please log in to see this code.
profile picture

Ben_Zurich

#4
Thank you for your answer.

Bottom line: There is no simple way to duplicate (i.e. to clone) a series. This is not a problem, I just wanted to know.
profile picture

Cone

#5
Probably the simplest way, however, is to simply perform a math operation to create a new series, like this:

CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).