Registered User Joined: 11/19/2015 Posts: 459
|
Hello.
1. What's the correct formula for counting the days back since an event has occurred? In an example, since a cross above EMA100?
2. Is there any kludge formula for outputting a "true" check for a selected ticker? Let's say I have a watchlist of 20 stocks. One of these stocks is "held by my uncle" and I want to track that piece of information with a "true check". Is there any tricky way to do this?
Thank you very much.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You can use the SinceTrue() function for this.
SinceTrue(XUP(C, XAVGC100), 50)
This checks the most recent 50 bars, returns between zero and (period - 1) if the cross did happen and returns -1 if the cross didn't happen within this period of time.
Sometimes it might make more sense to return between zero and period with period happening if the cross didn't happen (instead of -1). If so, you could use the following structure instead.
TrueInRow(NOT(XUP(C, XAVGC100)), 50)
Other than the flag feature, I really can't think of a kludge to indicate a symbol is held by my uncle.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
Registered User Joined: 11/19/2015 Posts: 459
|
Hi, Bruce. Hope all is well, and thank you very much. Sorry for my late reply.
Thank you for the solutions to part A. I think for part B, simply get to know your uncle better. Take him out for coffee or miniature golf. He'll probably offer a tip or two. I don't know, just spitballing here.
Enjoy the weekend. Thanks again.
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|