Runtime error with DataSeries which sums up/down days in a period
Author: 07nioe
Creation Date: 10/26/2018 9:04 AM
profile picture

07nioe

#1
Hi Eugene, again I need your support. I would like to create a Dataseries indicator which sums up the down and up days within a certain period.

I wrote the following method to do so:

CODE:
Please log in to see this code.



Unfortunaltely, there is a runtime error. I thought I protected the loop from getting smaller zero. But it's not like that. Do you know where the error is?

Thank you very much.
Best
Niels
profile picture

Eugene

#2
Hi Niels,

Don't code what you can beg, borrow or steal. ;) These indicators have been part of Community Indicators probably since day one - for over a decade now:

Negative Closes
Positive Closes
profile picture

07nioe

#3
you are right! :-) Thanks for the links. Haven't seen the indicators.

Best
Niels
profile picture

Eugene

#4
Any time :)
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).