Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 6/30/2017 Posts: 1,227
|
Bruce, PCF(s) please...
The red line below is the 5-period Moving Linear Regression indicator; it does a nice job of "hugging" price.
The green line is the Time Series Forecast indicator, set to 5 periods and 1 Forecast Bar.
Together they do a decent job of following swings (green on top, up; red on top, down) but they clutter up the chart.
Can we plot a row of dots ... Green when the TSF is above the Moving LinReg Line, and Red when the Moving LinReg Line is above the TSF? That will allow me to remove the lines from the price pane.
Swing baby!
The screengrab is bigger than I thought but I didn't want to go back and resize it - sorry.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Green Dots:
0 / ABS(FAVGC5 > AVGC5)
Red Dots:
0 / ABS(FAVGC5 < AVGC5)
Yellow Dots?
0 / ABS(FAVGC5 = AVGC5)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
Oooo, I like the idea of a 3rd color when they're equal, thanks! Though since the indicators are calculated out to two decimal points I'm not sure how often that'll happen. Still, if this turns out to be useful maybe we'll color the dots yellow when they're "close" based on some criteria.
I can always count on you to take my ideas and improve them. :)
No one indicator alone is enough. I'll have to filter these so I don't go short during uptrends, etc ... but I have to admit these do a pretty decent job of tracking swings.
Thanks again, Bruce!
Btw, looks like the subscriptions feature is still broken. Bummer. I try not to abuse the star rating thing but on days I post multiple times it helps me keep track. :)
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
I just noticed something. Are these PCFs really using linear regression and time series forecast? I'm the world's worst PCF code reader, but these look more like moving averages.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Yes, it is using moving linear regression and time series forecast.
Try the following as a Custom PCF Indicator in the same pane and scale as the moving linear regression.
3 * FAVGC5 - 2 * AVGC5
And the following in the same pane and scale as the time series forecast.
(9 * FAVGC5 - 7 * AVGC5) / 2
So:
(9 * FAVGC5 - 7 * AVGC5) / 2 > 3 * FAVGC5 - 2 * AVGC5
Which is the same as:
9 * FAVGC5 - 7 * AVGC5 > 6 * FAVGC5 - 4 * AVGC5
Which is the same as:
3 * FAVGC5 > 3 * AVGC5
Which is the same as:
FAVGC5 > AVGC5
Easier yet, just plot that last Condition Formula as the Boolean Formula in a Custom PCF % True Indicator and compare the results to the charted moving linear regression and time series forecast (or try the Custom PCF Indicators recommended in my original response).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
Looked up the syntax, and AVG looks like a simple moving average and FAVG looks like the frownt weighted moving average.
Is this really going to work? In my experience a 5-period linear regression line turns about 1 bar sooner than an EMA and about 2 bars sooner than an SMA. Never compared it to front weighted averages.
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
Whoops, we just crossed on the interwebs. Reading your response now.
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
I'll give it a try, but I've learned to defer to your Jedi skills. I hate math, that's why I learned to program computers as a kid - I let the computer do all the work. LOL. Should've paid more attention in math class.
|
|
Registered User Joined: 11/19/2015 Posts: 459
|
Hello.
Would you please help with a formula for "percent of the last 200 bars was [green condition is true]"?
and
"Number of times green was true in a row 5(min) to 8(max) times over the last 200 bars"?
Thank you very much.
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
|
|
Registered User Joined: 11/19/2015 Posts: 459
|
Yes, sorry. I'm not sure if whether on TC's forums it's easier for Bruce et al to address the question in the source or in a new post.
Also, there's the idea of continuity: is the greater good served by having one contiguous set of information? I think so.
I believe we'll need to stop believing in hijacking and start believing in utopia.
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
No worries. Just having a little fun while waiting for a webinar to start.
Greater good? Utopia??
I believe it is time for another round of margaritas.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Assuming you mean the green dots given above (and not just green price bars or candles), the percentage of the most recent 200 dots which were green would be:
CountTrue(FAVGC5 > AVGC5, 200) / 2
And the number of times there were exactly 5 to 8 green dots in a row entirely within the most recent 200 bars would be:
CountTrue(ABS(TrueInRow(FAVGC5 > AVGC5, 9) - 6.5) < 2, 193)
Or ending within the most recent 200 bars.
CountTrue(ABS(TrueInRow(FAVGC5 > AVGC5, 9) - 6.5) < 2, 200)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/19/2015 Posts: 459
|
Hi, Bruce. Yes, I meant the green dots above.
Thank you very much, Bruce, as always. I truly appreciate it.
Also, UnclePennybags has elected you President of Utopia, and I seconded it.
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
Bruce can't be the prez of Utopia ... he's already mayor of the Hamptons.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |