Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 11/19/2015 Posts: 459
|
Hello.
I use the following to track how far above or below price is to the EMA8. I use it as a column.
(C - XAVGC8 ) / ((C + XAVGC8) / 2)*100
This is helpful but doesn't really depict directionality. There are four conditions I'm interested that would better characterize the relationship between price direction and the EMA8.
I would like to track the trend of price on a 3-day basis in the following ways:
-
Price is above the EMA8 and diverging "further up and away" from the EMA8 over the last 3 days [strength]
-
Price is above the EMA8 and converging "down and toward" the EMA8 over the last 3 days [could fade]
-
Price is below the EMA8 and "converging upward" toward the EMA8 over the last 3 days [could build]
-
Price is below the EMA8 and "diverging further away" from the EMA8 over the last 3 days [weakness]
Do you have suggestions on how to build these?
Thank you.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
We can create Condition Formulas for these types of things, but the results will be true or false instead of being a numeric value like your original formual.
Strength
C > XAVGC8 AND C - XAVGC8 > C3 - XAVGC8.3 AND FAVG(C - XAVGC8, 4) > AVG(C - XAVGC8, 4)
Could Fade
C > XAVGC8 AND NOT(C - XAVGC8 > C3 - XAVGC8.3 AND FAVG(C - XAVGC8, 4) > AVG(C - XAVGC8, 4))
Could Build
C < XAVGC8 AND NOT(C - XAVGC8 < C3 - XAVGC8.3 AND FAVG(C - XAVGC8, 4) < AVG(C - XAVGC8, 4))
Weakness
C < XAVGC8 AND C - XAVGC8 < C3 - XAVGC8.3 AND FAVG(C - XAVGC8, 4) < AVG(C - XAVGC8, 4)
These formulas assume the 3 bars start 3 bars ago and not 2 bars ago. The formulas use the 3 period rate of change and the linear regression slope over the same period (which is a 4 period linear regression slope) to check for the direction of price vs the moving average.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/19/2015 Posts: 459
|
Yes, I assumed it would be true/false. These are perfect. I appreciate your help -- the support brings incredible value to the platform. Thanks again.
|
|
Registered User Joined: 11/19/2015 Posts: 459
|
Hello. I'm seeing a ticker return true for both "strength" and "fading". Is this possible?
It's CEF.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
This should not be possible if both conditions were updated at the same time.
While the C > XAVGC8 portions would be true for both formulas, the C - XAVGC8 > C3 - XAVGC8.3 AND FAVG(C - XAVGC8, 4) > AVG(C - XAVGC8, 4) and the NOT(C - XAVGC8 > C3 - XAVGC8.3 AND FAVG(C - XAVGC8, 4) > AVG(C - XAVGC8, 4)) sections should not be able to be true simultaneously.
This is because the NOT() specifically turns true into false or false into true. So if that portion is true for strength, it cannot also be true for fade because it is NOT( true) .
If you are using the formulas as WatchList Columns, I would edit the column so you can check the refresh rate and set it to the shortest period listed.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/19/2015 Posts: 459
|
Do you think it was simply not updated? Just curious, not to concerned about it.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I really do think it was just not updated. I cannot say for sure that was the issue, but it should not be possible for both formula to be true at the same time.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/19/2015 Posts: 459
|
It's possible that I'm not seeing well, but I wanted to show you anyhow.
"1 and 2" are copied directly out of the "Edit Condition" calculations for the columns, just to be sure.
http://imgur.com/a/tRjkB
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Have you edited the WatchList Columns to check both the refresh rate and verify the correct formulas were used?
When I plot all four formulas in the same pane and scale as Custom PCF % True Indicators, exactly one of these formulas is always true at a time.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/19/2015 Posts: 459
|
No, I usually manually refresh from the main window. I did refresh before sending this to you and just now, and CEF persists.
The notepad paste contains the formulas taken directly out of the column's formula. I just confirmed them against the same two formulas in this thread -- they'r e the same.
This is a fund -- could that have anything to do with it?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The symbol is CEF? I show that as true for strength and false for fade. Please try removing and re-adding the WatchList Column.
It shouldn't make any difference if it is a fund or not. It is just using closing prices for all of the calculations.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 11/19/2015 Posts: 459
|
Before I did that, I just re-pasted the exact same existing formula in. It seemed to recalculate things and the correct flags are now showing. Note that the formula was not different, nor did I delete the column. I just pasted the same formula in the editing window on top of itself, then closed it. Just thought you should know.
Thanks again for all the help. Much appreciated.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |