Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Exponential Moving Average of TSV Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Andranik
Posted : Wednesday, August 29, 2018 9:35:26 AM
Registered User
Joined: 8/24/2016
Posts: 6

Hello,

I am trying to create a PCF that will scan for stocks that have the following criteria:

1) TSV 24 less than 0 on the weekly chart

OR

2) TSV 24 less than the EMA12 of TSV 24 on the weekly chart

I came up with the following PCF myself, but it for some reason it is coming up with inaccurate results when running the test with MSFT

  TSV24 < 0 OR
 
  TSV24 < XAvg(TSV24,12)
 
  Timeframe: Weekly
 
Thanks
StockGuy
Posted : Wednesday, August 29, 2018 9:42:42 AM

Administration

Joined: 9/30/2004
Posts: 9,187

The formula looks correct. What makes you think the results are incorrect?  It's currently returning False on the MSFT weekly chart because TSV is above 0 and its 12 bar exponential average.

Andranik
Posted : Thursday, August 30, 2018 12:09:07 AM
Registered User
Joined: 8/24/2016
Posts: 6

When running this PCF as a scan in my watchlist, I'm still pulling up stocks that don't fit the above criteria. (i.e. many of the stocks that are marked as "True" when using the PCF have a TSV24 greater than XAvg(TSV24,12).

Also, after running the MSFT test using the PCF above, the values for TSV24 and XAvg(TSV24,12) that I revceived differ from the values for those indicators plotted on the actual chart for MSFT.

bcochrane
Posted : Thursday, August 30, 2018 6:06:37 AM
Registered User
Joined: 9/17/2010
Posts: 484

Suggestion:  make sure ALL time periods are Weekly (Chart, Scan Condition and Columns) and similarly, ALL average types are Exponential

Bruce_L
Posted : Thursday, August 30, 2018 8:44:58 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

If the 24 period TSV is exponential (this does not appear to be specified either way in the original request) , then the formula for the 12 period exponential moving average of the TSV would actually be the following.

XAVG(XAVG(TSV, 24), 12)

And the 24 period exponential TSV would be the following.

XAVG(TSV, 24)

With your combined formula being the following.

XAVG(TSV, 24) < 0 OR XAVG(TSV, 24) < XAVG(XAVG(TSV, 24), 12)

Note that this could be shortened to the following.

XAVG(TSV, 24) < 0 OR XAVG(TSV, 12) < XAVG(TSV, 24)

Assuming the time frame on the chart is weekly, make sure the time frame of the formula is set to weekly as well. If you have already added the formula to your layout, remove it and re-add it.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Andranik
Posted : Thursday, August 30, 2018 9:28:47 AM
Registered User
Joined: 8/24/2016
Posts: 6

How is the TSV24 and the EMA12 of the TSV calculated on the chart? Is it by a simple moving average or an exponential moving average? For example The TSV24 on the weekly chart of MSFT is 215.6K (this is a rounded value). And the EMA12 on the weekly chart is 196,035.88. How were these values calculated? What are the formulas used to calculate those values that show up on the charts?

StockGuy
Posted : Thursday, August 30, 2018 9:32:07 AM

Administration

Joined: 9/30/2004
Posts: 9,187

When you load TSV from the indicator library, the TSV uses a simple moving average 24 and the trigger line is a simple moving average 12.  But you can edit either or both and change the averages to exponential.

Andranik
Posted : Thursday, August 30, 2018 9:39:06 AM
Registered User
Joined: 8/24/2016
Posts: 6

So would this be the formula for the calculating the TSV24 for MSFT?

(TSV + TSV1.1 + TSV1.2 + TSV1.3 + TSV1.4 + TSV1.5 + TSV1.6 + TSV1.7 + TSV1.8 + TSV1.9 + TSV1.10 + TSV1.11 + TSV1.12 + TSV1.13 + TSV1.14 + TSV1.15 + TSV1.16 + TSV1.17 +TSV1.18+ TSV1.19+ TSV1.20+TSV1.21+ TSV1.22+ TSV1.23 + TSV1.24) / 24

Bruce_L
Posted : Thursday, August 30, 2018 9:43:02 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

No, because you are adding together 25 values and then dividing by 24.

If you want to write a simple TSV24 the long way, you would need to leave out the TSV1.24 in your formula.

(TSV + TSV1.1 + TSV1.2 + TSV1.3 + TSV1.4 + TSV1.5 + TSV1.6 + TSV1.7 + TSV1.8 + TSV1.9 + TSV1.10 + TSV1.11 + TSV1.12 + TSV1.13 + TSV1.14 + TSV1.15 + TSV1.16 + TSV1.17 + TSV1.18 + TSV1.19 + TSV1.20 + TSV1.21 + TSV1.22 + TSV1.23) / 24

But you realy should just write this as:

TSV24

Or:

AVG(TSV, 24)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Andranik
Posted : Friday, August 31, 2018 10:30:58 AM
Registered User
Joined: 8/24/2016
Posts: 6

Thanks Bruce! The PCF now matches the results on the chart, after using the formulas you posted on 08/30 @ 8:44:58 am.

The TSV24 that is plotted on the chart is actually the 24-period exponential TSV. By just inputing "TSV24" into the PCF I would get the simple TSV value, which is  different from the TSV24 value shown on the charts.

I also referred to a thread you answered back in 2014  that was similar to mine: 

http://forums.worden.com/default.aspx?g=posts&t=47182

 

 

Thanks

Bruce_L
Posted : Friday, August 31, 2018 10:45:02 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.