Rank: Advanced Member
Groups: Registered, Registered Users Joined: 12/19/2012(UTC) Posts: 54 Location: Austria
|
Hi, i try to scan for bestperforming stocks between april 2009 and july 2011.
Anyone any idea how i can „plot“ a vertical line or a kind of symbol in a new window to see where MS start the analysis?
I know about the Ref(C, - 500) for example to start, and Ref(C, -250) to end the calculation,
but i dont know WHEN (which date) it really is in the chart (the -500).
May you have got any idea that it is possible to SEE when it start (april 07) and to which point (ends 07 2011)?
((Ref(C, -250) / Ref(C, -500) ) * 100 ) – 100
Thanks!
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 12/19/2012(UTC) Posts: 54 Location: Austria
|
Hmm.... due to testing, i guess MS can not really ..... use data which are longer ago than 699 ???
Ref(C, - 700) will not bring any result. Some suggestions? : )
And a happy new Year (in a few hours) :- D
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 12/19/2012(UTC) Posts: 54 Location: Austria
|
Okay... Options : Load Data : 4.000 : -))
But, why is the expert advisor not working correctly when i try to use:
Bullish: When(Ref(C, - 1500), =, Ref(C, - 1500))
At least i just want to have a vertical line, when the date (or the close of the date) is
just the same value, so i see "when" my test begin.
With expert advisor i need to use this:
Bullish: When(Ref(C, - (4000-1500)), =, Ref(C, - (4000-1500)))
that it start at the point i "think" it is the right one. By now in the year 2003.
But why do i need to subtract the difference from the loaded data range (4000 - [censored]?)
Help... me.... or ... send me a 4m long rope! : -)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
There is a another Load Data under File Open Options; it's separate from the Exploration options.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 12/19/2012(UTC) Posts: 54 Location: Austria
|
Hi, yes it is!
But again, I am still looking for the formula for a Scan, AND EXPERT, so see visually where the test begin. So scan for the best performer between the year 2003 and 2007. And use the ref(C, ---) function to see in the chart (i repeat myself) where the start-point is.
01.04.2003 until 08.07.2007 for example.
Hmm?! : -)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 10/29/2004(UTC) Posts: 1,394 Location: Glastonbury, CT
Was thanked: 2 time(s) in 2 post(s)
|
you may want to check out this site
http://www.metastocktools.com/MetaStock/RoC.txt
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 12/19/2012(UTC) Posts: 54 Location: Austria
|
Hi Henry,
thanks a lot! I still try to use the code, but.... I guess i dont really know how.
so if someone *smile* has a code (part?) for me.
just scan between 2 date like 2003 till 2007.
the ROC is using a start-date till the "today" close.
but, i dont know how to cut it down only from start date, till the end of 2007.
Yeah, kind regards!
Clemens
|
|
|
|
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)
|
There have been plenty of examples already done using dates, you could also use the forum.dll daterange function. This might get you on track: Code:
sDay:=1;
sMonth:=4;
sYear:=2003;
nDay:=8;
nMonth:=7;
nYear:=2007;
start:=Year()>sYear OR (Year()=sYear AND (Month()>sMonth OR Month()=sMonth AND DayOfMonth()>=sDay));
end:=Year()<nYear OR (Year()=nYear AND (Month()<nMonth OR Month()=nMonth AND DayOfMonth()<=nDay));
sPrice:=ValueWhen(1,Cum(start)=1,OPEN);
ch:=100*(CLOSE-sPrice)/sPrice;
{plot}
ValueWhen(1,end,ch);
wabbit [:D]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 12/19/2012(UTC) Posts: 54 Location: Austria
|
YEAH! You made my day! Nice, nice and thx a lot :- D
|
|
|
|
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.