Atlanta Georgia
Posts: 2 since Jun 2014
Thanks Given: 0
Thanks Received: 2
|
Hello, I am trying to make a custom study to display the Year-To-Date return as a column on the Marketwatch Tab
of TOS, my script looks like this with aggregation set to "D" (Daily):
plot ytdreturn = (close()-close[167])/(close[167]);
By my understanding that should give the close for today minus the close from 167 days ago, divided by the close from 167 days ago or the Year to Date % return in other words.
However, this gives me a 161% return for priceline (obviously incorrect, even if you use the 52 wk low it is impossible)
And a 133% return for the SOX (52 week low is 442, again impossible).
Can anyone please help???
|