logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
LongShot  
#1 Posted : Wednesday, December 28, 2005 6:44:07 PM(UTC)
LongShot

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/4/2005(UTC)
Posts: 31

Sorry, can't think of any other way to name this. What I have in mind would look like a trend line. I want a continous function that would start at a specified date and plot from that date forward to "today". The value displayed would be the dollar value of the close on the start date multiplied each day in succession by the daily factor derived from a user input value for %/year growth. In other words, it would look like a graph of the daily value of say $1000 in a savings account giving [user defined] percent interest per year. The math is all quite do-able, but I can't figure how to start with being able to place the origin at the date I want to select. My idea for this is that I don't like comparing myself to the "market"; rather, I want to set goals and see how I currently stand against them. Ideally, the formula should also decide how many trading days there are until 365 days after the start date... just to be accurate. I think I've seen some stuff Jose has done that I could probably derive this from. It would seem that an indicator like this may also be used to threshold some other indicators (?) Any ideas? Thanx dc
Jose  
#2 Posted : Wednesday, December 28, 2005 10:59:41 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Try the chart indicator below for starters. If more accuracy is required, then a calendar function could be incorporated into the formula. [code:1:74cfae3f28] ===================================== Trendline - yearly performance growth ===================================== ---8<-------------------------------- {©Copyright 2005 Jose Silva. For personal use only. http://www.metastocktools.com } { User inputs } StDay:=Input("start Day",1,31,1); StMnth:=Input("start Month",1,12,11); StYear:=Input("start Year",1800,2200,2005); growth:=Input("Yearly growth %", -10000,10000,20)/25200; { Date signal } active:=Year()>StYear OR (Year()=StYear AND (Month()>StMnth OR Month()=StMnth AND DayOfMonth()>=StDay)); signal:=active AND Alert(active=0,2); { Close at date signal } signalVal:=ValueWhen(1,signal,C); { Yearly growth % trendline } trend:=signalVal*(1+BarsSince(signal)*growth); { Plot on price chart } trend ---8<-------------------------------- [/code:1:74cfae3f28] jose '-)
Jose  
#3 Posted : Thursday, December 29, 2005 5:10:56 AM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
This thread continues here. jose '-)
hayseed  
#4 Posted : Thursday, December 29, 2005 6:12:29 AM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey dc.... thats a neat idea you had.... after using the downloader to create a security representing the savings account and editing the data to reflect the 1000$ daily balance , jose's deal can be ploted way into the future.... it would serve as a good goal, just as you mentioned......h
LongShot  
#5 Posted : Thursday, December 29, 2005 11:58:48 AM(UTC)
LongShot

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/4/2005(UTC)
Posts: 31

Jose, that is exactly what I was trying to figure out. Thanx
Users browsing this topic
Guest (Hidden)
Similar Topics
Relative Performance indicator [RESOLVED] (Formula Assistance)
by TomHam 12/24/2005 8:28:26 PM(UTC)
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.