ATRP result is inconsistent
Author: kazuna
Creation Date: 3/23/2010 12:38 PM
profile picture

kazuna

#1
The below is a sample script which debug print ATRP at the last day.
The problem I'm seeing is an inconsistency in the result with scale and data range combination.

I ran this script with MSFT symbol and got the following results.

Scale: Daily

1 Months Range: 3/22/2010, 1.27852310270616
2 Months Range: 3/22/2010, 1.29262271192594
3 Months Range: 3/22/2010, 1.29281744587297

Scale: 1 Minute

1 Months Range: 3/23/2010, 1.27226829264635
2 Months Range: 3/23/2010, 1.28339805116751
3 Months Range: 3/23/2010, 1.28355290943638

The data range is much longer than 5 day periods that is specified to the data series.
Also the script always runs in daily scale regardless of the scale specified in the data panel.

Why these results are different and these are expected?

CODE:
Please log in to see this code.
profile picture

Cone

#2
WealthScript Programming Guide: Indicators > Stability of Indicators

If you're asking why the values are just different, it's because they are. It's a result of more (or less) data contributing to the calculation of that class of indicator.
profile picture

kazuna

#3
I wasn't expecting if ATRP uses the previous values and so I didn't even try to look at the guide. Thank you for the clarification.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).