Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Registered User Joined: 1/24/2010 Posts: 3
|
I was looking to see if there is a way to change the color of a moving average depending on the direction. I examined the possibility that you could have two averages, on that would only print if the move is up and another if there is another down. However, my programming experience with TC2000 PCF's is still limited and I don't know if this functionality actually possible. If there is a way to do this then any help would be appreciated. Thanks !
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
There is no way to actually change the color of the moving average.
You can however create two (or three if you want a color for not changing direction) Custom PCF Indicators using different colors and the Dots Plot Style and plot them in the same pane and scale as the moving average.
So for example, with a 10 period simple moving average, you could use the following Formula setting in the Custom PCF Indicator for the up dots.
IIF(AVGC10 > AVGC10.1, AVGC10, 1 / 0)
And the following Formula setting for the Custom PCF Indicator plotting the down dots.
IIF(AVGC10 < AVGC10.1, AVGC10, 1 / 0)
Note that the 1 / 0 creating division by zero error on purpose in order to make it so the formula doesn't plot a dot when false.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
I swear I saw someone using TC2000 in some online event with either a moving average or some other oscillating plot that alternated colors based on direction, without using dots, ... but it could just be the summer heat.
We now return to our ice cream ...
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I can't think of a way to do so (which doesn't mean it isn't possible).
You can't use the 1 / 0 trick to force a division by zero error in a line chart like you can with the Dots and Histogram Plot Styles. Well you can, but it will still connect the the value which do plot with lines.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
No worries, it's just eye candy, IMO. The smarter I get, the simpler my charts get.
|
|
Registered User Joined: 1/24/2010 Posts: 3
|
I thought that I had seen this as well but couldn't think how they had done it. Anyhow this will work fine and if I find another way then I'll update this thread.
Thanks Bruce !
|
|
Registered User Joined: 10/7/2004 Posts: 86
|
Bruce, what about using the technique you developed for the ttm squeeze?
Thinking out loud.
rctrade
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
The TTM Squeeze technique is essentially the same as the Dots technique presented except that it uses the Histogram Plot Style instead of the Dots Plot Style.
The reason to use the Dots Plot Style in this case is that my assumption was that the moving average is being applied to something (such as price) that you would not want to cover up with a histogram.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |