New version 17 available now


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


New account application Trading resources
Margin rates Stock & option commissions

Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

TSV12 6, 12, & 30 LR Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jbem777
Posted : Tuesday, August 08, 2017 3:37:06 PM
Gold Customer Gold Customer

Joined: 7/9/2017
Posts: 13

I have been trying to create the a PCF for the cross of different MLR for the TSV 12. I thought I had the formula correct, been when plotted using using the Custom Indicator function they lines were very different than what was plotted in the window. Furthermore, when using the Custom % Indicator to back test periods in which these MLR's have crossed my numbers are way off. Could I please get the 6, 12, and 30 period PCF's for a TSV12. Then I could plot the relationships I am looking for using  < or >. I am not looking for the day that they crossed, just the PCF to tell when the 6 or 12 MLR is greater or less than the 30 MLR of TSV12.

Also, is there a way to have the values of the differences show up in my column set. For example, I would like to see that diffrenece between the 6 and 30 MLR of TSV12 so I could sort them accordingly.

Thanks

Bruce_L
Posted : Tuesday, August 08, 2017 4:10:50 PM


Worden Trainer

Joined: 10/7/2004
Posts: 60,672

Linear Regression & Moving Linear Regression

MLR6 of simple TSV12 in v17:

3 * FAVG(TSV12, 6) - 2 * AVG(TSV12, 6)

MLR12 of simple TSV12 in V17:

3 * FAVG(TSV12, 12) - 2 * AVG(TSV12, 12)

MLR30 of simple TSV12 in v17:

3 * FAVG(TSV12, 30) - 2 * AVG(TSV12, 30)

So MLR6 or MLR12 greater than MLR30 would be:

GREATEST(3 * FAVG(TSV12, 6) - 2 * AVG(TSV12, 6), 3 * FAVG(TSV12, 12) - 2 * AVG(TSV12, 12)) > 3 * FAVG(TSV12, 30) - 2 * AVG(TSV12, 30)

And the difference between MLR6 and MLR30 would be:

3 * FAVG(TSV12, 6) - 2 * AVG(TSV12, 6) - 3 * FAVG(TSV12, 30) + 2 * AVG(TSV12, 30)

Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis

MLR6 of simple TSV12 in v12.5:

AVG(TSV12, 6) + 5 * (5 * (TSV12 - TSV12.5) + 3 * (TSV12.1 - TSV12.4) + TSV12.2 - TSV12.3) / 70

MLR12 of simple TSV12 in v12.5:

AVG(TSV12, 12) + 11 * (11 * (TSV12 - TSV12.11) + 9 * (TSV12.1 - TSV12.10) + 7 * (TSV12.2 - TSV12.9) + 5 * (TSV12.3 - TSV12.8) + 3 * (TSV12.4 - TSV12.7) + TSV12.5 - TSV12.6) / 572

MLR30 of simple TSV12 in 12.5:

AVG(TSV12, 30) + 29 * (29 * (TSV12 - TSV12.29) + 27 * (TSV12.1 - TSV12.28) + 25 * (TSV12.2 - TSV12.27) + 23 * (TSV12.3 - TSV12.26) + 21 * (TSV12.4 - TSV12.25) + 19 * (TSV12.5 - TSV12.24) + 17 * (TSV12.6 - TSV12.23) + 15 * (TSV12.7 - TSV12.22) + 13 * (TSV12.8 - TSV12.21) + 11 * (TSV12.9 - TSV12.20) + 9 * (TSV12.10 - TSV12.19) + 7 * (TSV12.11 - TSV12.18) + 5 * (TSV12.12 - TSV12.17) + 3 * (TSV12.13 - TSV12.16) + TSV12.14 - TSV12.15) / 8990

So MLR6 or MLR12 greater than MLR30 would be:

AVG(TSV12, 6) + 5 * (5 * (TSV12 - TSV12.5) + 3 * (TSV12.1 - TSV12.4) + TSV12.2 - TSV12.3) / 70 > AVG(TSV12, 30) + 29 * (29 * (TSV12 - TSV12.29) + 27 * (TSV12.1 - TSV12.28) + 25 * (TSV12.2 - TSV12.27) + 23 * (TSV12.3 - TSV12.26) + 21 * (TSV12.4 - TSV12.25) + 19 * (TSV12.5 - TSV12.24) + 17 * (TSV12.6 - TSV12.23) + 15 * (TSV12.7 - TSV12.22) + 13 * (TSV12.8 - TSV12.21) + 11 * (TSV12.9 - TSV12.20) + 9 * (TSV12.10 - TSV12.19) + 7 * (TSV12.11 - TSV12.18) + 5 * (TSV12.12 - TSV12.17) + 3 * (TSV12.13 - TSV12.16) + TSV12.14 - TSV12.15) / 8990 OR AVG(TSV12, 12) + 11 * (11 * (TSV12 - TSV12.11) + 9 * (TSV12.1 - TSV12.10) + 7 * (TSV12.2 - TSV12.9) + 5 * (TSV12.3 - TSV12.8) + 3 * (TSV12.4 - TSV12.7) + TSV12.5 - TSV12.6) / 572 > AVG(TSV12, 30) + 29 * (29 * (TSV12 - TSV12.29) + 27 * (TSV12.1 - TSV12.28) + 25 * (TSV12.2 - TSV12.27) + 23 * (TSV12.3 - TSV12.26) + 21 * (TSV12.4 - TSV12.25) + 19 * (TSV12.5 - TSV12.24) + 17 * (TSV12.6 - TSV12.23) + 15 * (TSV12.7 - TSV12.22) + 13 * (TSV12.8 - TSV12.21) + 11 * (TSV12.9 - TSV12.20) + 9 * (TSV12.10 - TSV12.19) + 7 * (TSV12.11 - TSV12.18) + 5 * (TSV12.12 - TSV12.17) + 3 * (TSV12.13 - TSV12.16) + TSV12.14 - TSV12.15) / 8990

And the difference between MLR6 and MLR30 would be:

AVG(TSV12, 6) + 5 * (5 * (TSV12 - TSV12.5) + 3 * (TSV12.1 - TSV12.4) + TSV12.2 - TSV12.3) / 70 - AVG(TSV12, 30) - 29 * (29 * (TSV12 - TSV12.29) + 27 * (TSV12.1 - TSV12.28) + 25 * (TSV12.2 - TSV12.27) + 23 * (TSV12.3 - TSV12.26) + 21 * (TSV12.4 - TSV12.25) + 19 * (TSV12.5 - TSV12.24) + 17 * (TSV12.6 - TSV12.23) + 15 * (TSV12.7 - TSV12.22) + 13 * (TSV12.8 - TSV12.21) + 11 * (TSV12.9 - TSV12.20) + 9 * (TSV12.10 - TSV12.19) + 7 * (TSV12.11 - TSV12.18) + 5 * (TSV12.12 - TSV12.17) + 3 * (TSV12.13 - TSV12.16) + TSV12.14 - TSV12.15) / 8990



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jbem777
Posted : Tuesday, August 08, 2017 5:20:35 PM
Gold Customer Gold Customer

Joined: 7/9/2017
Posts: 13

Thanks Bruce. Maybe I am making a mistake somewhere. In the image below, I have the MLR of TSV12 plotted for the periods of 6, 12, and 30. The data source for the plots is TSV12.  I then used a Custom % True Indicator to plot the formula for when either the 6 or 12 MLR are greater than the 30 MLR and it doest work as evidenced by the blue dots. However, when I plot the formulas that you graciously provided on the candlestick portio of my chart, using price as the data source, it matched the dots on the TSV section. I am thinking that I need to change the C to TSV12. Is this correct?

[URL=http://s258.photobucket.com/user/jbem777/media/MLR%20Capture_zpso6haegz5.jpg.html]

Bruce_L
Posted : Tuesday, August 08, 2017 6:49:28 PM


Worden Trainer

Joined: 10/7/2004
Posts: 60,672

Changing all instances of C to TSV12 or using TSV12 as the data source will not work, but the results only require minor tweaking. I have made the changes above.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jbem777
Posted : Tuesday, August 08, 2017 7:55:51 PM
Gold Customer Gold Customer

Joined: 7/9/2017
Posts: 13

Thanks for the update Bruce. I don't know why but the plots of thees MLR's does not match the plots on my TSV window on my screen. Any thoughts on why that might be? The formulas are correct, I don't doubt that. It just seems odd that the lines that are plotted are "rougher" and don't match what I have set up. Any thoughts. Should I be using a different data source for my plots?

Bruce_L
Posted : Wednesday, August 09, 2017 8:33:45 AM


Worden Trainer

Joined: 10/7/2004
Posts: 60,672

My first guess would be the Custom PCF Indicators are not plotted in the same scale as TSV and its moving averages (I am assuming the Custom PCF Indicators are in the same pane).

Click on the Custom PCF Indicators one at a time and select Scaling. Then make sure Scale wth is set to TSV 12.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jbem777
Posted : Friday, August 11, 2017 5:47:24 PM
Gold Customer Gold Customer

Joined: 7/9/2017
Posts: 13

Hi Bruce. I went and double checked everything. Below is an image with the various plots shown in the same window. As you can see, the MLR6 of TSV12 is plotted in yellow. The formula that you provided for MLR6 in plotted in white. They are scaled together. The only thing that I can think of is the data source for the plot for the formula you provided is "price history," however, when I choose TSV12, nothing is plotted. Below is an image.

[URL=http://s258.photobucket.com/user/jbem777/media/TSV12%206%20MLR%20Plot_zpscu5ax4fr.jpg.html] [/URL]

 

[IMG]http://i258.photobucket.com/albums/hh250/jbem777/TSV12%206%20MLR%20Plot_zpscu5ax4fr.jpg[/IMG]

Bruce_L
Posted : Tuesday, August 15, 2017 11:44:41 AM


Worden Trainer

Joined: 10/7/2004
Posts: 60,672

I can't see your images. It seems to indicate you would need to upgrade your service is order for those images to visible.

That said, the lines match up exactly for me in my copy of TC2000 with the TSV and Custom PCF Indicator using Price History as the Data Source and the Moving Linear Regression using the TSV as the data source.

Note that the TSV is a 12 period simple TSV (as stated in the formula descriptions given above). If your TSV is exponential, then the formula would need to be re-written to take that into account.

MLR6 of exponential TSV12 in v17:

3 * FAVG(XAVG(TSV, 12), 6) - 2 * AVG(XAVG(TSV, 12), 6)

MLR12 of exponential TSV12 in V17:

3 * FAVG(XAVG(TSV, 12), 12) - 2 * AVG(XAVG(TSV, 12), 12)

MLR30 of exponential TSV12 in v17:

3 * FAVG(XAVG(TSV12, 12), 30) - 2 * AVG(XAVG(TSV12, 12), 30)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jbem777
Posted : Friday, October 20, 2017 12:20:14 PM
Gold Customer Gold Customer

Joined: 7/9/2017
Posts: 13

Hi Bruce, 

I have finally had time to come back to this and continue to have problems. When I try and plot the formulas using TSV 12 as the data source I get nothing. I am using a custom % true PCF to determine when these paramters are met. I have included some images that should help. 

 
Here is what it looks like when I plot the 6 MLR of TSV 12 Using Price History as the data source. 
 
Bruce_L
Posted : Friday, October 20, 2017 1:24:52 PM


Worden Trainer

Joined: 10/7/2004
Posts: 60,672

Setting the data source to anything besides Price History for a Custom PCF Indicator isn't gonig to work. Don't do that.

The issue with the formulas not matching the moving linear regressions seems to be a bug in applying the AVG() function to TSV in v12.4 (the moving average is not applied at all) which has been fixed in later versions. I have created alternate versions not using the AVG() function.

6 period moving linear regression of simple TSV12.

(11 * TSV12 + 8 * TSV12.1 + 5 * TSV12.2 + 2 * TSV12.3 - TSV12.4 - 4 * TSV12.5) / 21

12 period moving linear regression of simple TSV12.

(23 * TSV12 + 20 * TSV12.1 + 17 * TSV12.2 + 14 * TSV12.3 + 11 * TSV12.4 + 8 * TSV12.5 + 5 * TSV12.6 + 2 * TSV12.7 - TSV12.8 - 4 * TSV12.9 - 7 * TSV12.10 - 10 * TSV12.11) / 78

30 period moving linear regression of simple TSV12.

(59 * TSV12 + 56 * TSV12.1 + 53 * TSV12.2 + 50 * TSV12.3 + 47 * TSV12.4 + 44 * TSV12.5 + 41 * TSV12.6 + 38 * TSV12.7 + 35 * TSV12.8 + 32 * TSV12.9 + 29 * TSV12.10 + 26 * TSV12.11 + 23 * TSV12.12 + 20 * TSV12.13 + 17 * TSV12.14 + 14 * TSV12.15 + 11 * TSV12.16 + 8 * TSV12.17 + 5 * TSV12.18 + 2 * TSV12.19 - TSV12.20 - 4 * TSV12.21 - 7 * TSV12.22 - 10 * TSV12.23 - 13 * TSV12.24 - 16 * TSV12.25 - 19 * TSV12.26 - 22 * TSV12.27 - 25 * TSV12.28 - 28 * TSV12.29) / 465



-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.