Rank: Advanced Member
Groups: Registered, Registered Users Joined: 5/6/2005(UTC) Posts: 52 Location: England
|
Hi, can anybody advise me on how to write an indicator to minus todays close
from prev closes. Starting at period 41 and coming down to yesterdays
period. Ive tried 'ref(c,-41)-c and ref(c,-41)-c and ref(c,-39)-c down
to ref(c,-1)'. This plots a straight line. Then Ive tried ROC(C, 40, %
) which gets very close but not precice enough. Im comparing results
to results in excel, dde to metastock. Appriciate any help
Regards Robert
ps, sorry for all the question hopefully in future Ill be able to give answers
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/8/2004(UTC) Posts: 2,266
Was thanked: 1 time(s) in 1 post(s)
|
C-ref(C,-1)
or
Roc(C,1,$)
Both should work ...
Unless I misunderstood your request. In which case you will have to explain how the 41 comes into play :D
Patrick
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Why not add up the last 41 closes and subtract that from 41*close?
Sum(C,41)-41*C
Hope this helps.
wabbit :D
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/10/2004(UTC) Posts: 863 Location: Salt Lake City, UT
|
:) Think of it this way Robert... everytime you ask a question someone else gets an answer without having to post. So - you are actually doing favors for the newer members, right?? :)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 5/6/2005(UTC) Posts: 52 Location: England
|
Thankyou for your replys, Ive actually gone with CloseDiff:= C - LastValue(C);
CloseDiff;
advised to me on another site, this matched my excel results perfect, Again thankyou for your replys
Regards Robert
ps as an aside, am I correct in thinking that meta cant plot into the future?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 9/8/2004(UTC) Posts: 2,266
Was thanked: 1 time(s) in 1 post(s)
|
robcpettit wrote:
ps as an aside, am I correct in thinking that meta cant plot into the future?
Yes that is correct.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey rob... thanks for posting your codes.... btw, it might be easier to plot into the future than to decide which future to plot.... for what its worth, kinda looks like 'csco's a sell along about september......
your right marilyn, the questions help as much as the answers .... its neat the way patrick and wabbit tackle the hard ones and leave the easy ones for us......h
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
rob,
Sorry about the delay in getting back to you here, but I have been quite busy!
Just a word of warning about the LastValue() indicator. Its a hindsight indicator and should be used with EXTREME CAUTION if being used as part of a trading system.
Other hindsight indicators inclue ZigZag, Peaks, Trough, Highest, Lowest etc. There are some warnings in the MS literature and plenty of good info on this and other bulletin boards.
BE VERY CAREFUL!
Hope this helps.
wabbit :D
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 5/6/2005(UTC) Posts: 52 Location: England
|
Hi,
Wabbit, thanks for the warning, it will be part of a trading system made up of approx 4 other indicators, and as such would never be used on iys own. As Ive only just started out (as yet not passed with any cash), Im spending alot of time getting to feel comfotable with metastock. And enjoying it, but it is only a tool at the end of the day.
Hayseed, nice looking chart, Im a bit lost though, have you plotted this into the future dates?.
Re plotting into the future, its sort of what id like to be able to do, What I would like to do is take the last actual plotted 40 periods and tack them onto the end of the chart if that makes sense. Ie if data upto date, tommorows plot would = 40 days ago next 39 etc.
Im reading Brian millards books whence the questions for different indicators.
Regards Robert
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey rob.... yes that is plotted into the future.... using the downloader, open the data sheet for the security your interested in and tack on more data.... cut and paste syle works best if your adding months or years....
it helps me to have a special folder prepared for that sort of thing.... that way there is no chance for my data meddling to misslead me in day to day operations....
holler back if you don't follow that and i'll post a better picture.....h
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 5/6/2005(UTC) Posts: 52 Location: England
|
Hayseed, thanks for that, so obvious when its pointed out, I will have ago
Regards Robert
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
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.