Custom DataSeries that changes every other cycle
Author: sofia
Creation Date: 2/13/2015 11:21 PM
profile picture

sofia

#1
Hello,

I want to create a custom series where data changes every other cycle. i.e if the input data series is 1,2,3,4,5,6 then custom data series is 1,1,3,3,5,5 etc


I am using following code, but it won't work. Can you please help ?



CODE:
Please log in to see this code.


Thanks,

Sofia
profile picture

Eugene

#2
You might want to use the % (mod) operator like shown below. No second loop is required:

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).