Counting number of times RSI is under 40
Author: xjlit
Creation Date: 6/30/2013 1:33 PM
profile picture

xjlit

#1
Hello,

I am new to Wealth Lab. I am more of a Perl scripter, not so much a programmer.

I am attempting to count the number of times that the 2 day rsi is under 40 (or some given number). Below is what I have come up with using examples from the Programming Guide and the Wiki. I don't seem to be getting a count. Could someone point me in the right direction so that I an understand what I need to do here?

Thanks,
John

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

Eugene

#2
Welcome to the forums John. I think you're looking for something like this:

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

xjlit

#3
Wow, thanks Eugene. I wasn't even close. That's very nice.

I have been looking through your code to try and get an understanding of how the C# programming code works. I have some questions below. If you have time could you comment?

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

Cone

#4
QUOTE:
//I understand the 2 and 40, but not the 2, 30 1 and 10,90,10. To what do these refer?
They are the default parameter values.

QUOTE:
//I've seen double in the docs but not sure how/when to use it
It declares a double-precision floating point variable. Standard C#.

QUOTE:
//Is thee a list of the DataSeries parameters somewhere?
Take advantage of the intellisense when typing WealthScript functions and indicators, however, each indicator's documentation is linked from the Technical Indicators dialog (Ctrl + F11). Intellisense is automatic, but if it stops showing (loss of focus, for example) you can get it back by striking Ctrl+Space.

QUOTE:
//I understand the formula except for the * 3
Help > WealthScript Programming Guide: Indicators > Stability of Indicators
profile picture

xjlit

#5
Thanks Cone. That is very helpful.
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).