This must have slipped my
attention. I have created several security() function based indicators. But
I always have assigned variables to the security() functions.
At the most, if I switch from daily
to weekly and then back, I get an error, which goes away if I restart
MS.
That would avoid creating several
indicators.
My very humble 2
cents.
----- Original Message -----
Sent: Wednesday, May 25, 2005 10:13
PM
Subject: Re: [EquisMetaStock Group]
Security Data Function Problem (2nd)
MetaStock's Security() function works reliably better
if you reference it from separate indicators.
Try
this:
1st
indicator -------------
=========== 500340-open =========== ---8<-------------- Security("500340",O) ---8<--------------
2nd
indicator -------------
============ 500340-close ============ ---8<-------------- Security("500340",C) ---8<--------------
Final
indicator ---------------
============ Torquaine
01 ============ ---8<--------------
{ User input
} pds:=Input("TOS periods",1,200,100);
{ Reference security
indicators } Op:=Fml("500340-open"); Cl:=Fml("500340-close");
{
Processing
} W1:=If(Cl>Op,(Cl-Op)*100/Op,0); BOSW1:=Sum(W1,pds);
{ Plot
in own window } BOSW1
---8<--------------
jose
'-) http://www.metastocktools.com
---
In equismetastock@xxxxxxxxxxxxxxx, Torquaine <torquaine@xxxx>
wrote: > Dear all > > now i am totally confused. I did
apply the following > code to ADDIDAS Salomon. > >
A:=Input("TOS periods",1,200,100); > >
W1:=If((Security("500340",C) > Security("500340",O)), >
(((Security("500340",C)-Security("500340",O))*100)/ Security("500340",O)), >
0); > BOSW1 := Sum(W1, A); > BOSW1; > > As stated
earlier, the codes works, but does give > different returns on DAX -
instead of the value of > ADDIDAS. Okay - I don't know why. The returned
value > of the indicator when applied to ADDIDAS is
: > 43,3493. Applying the following indicator to ADDIDAS : >
> A:=Input("TOS periods",1,200,100); > > W1:=If(C >
O,(C-O)*100/O, 0); > BOSW1 := Sum(W1, A); > BOSW1; >
> The returned value is : 43,3493. > > Well, that's what
i expected. > > Lets try the same thing on the DAX : >
> first formula result : 51,8667 > > second formula result
: 25,4152 > > ??? What ?!!!! > > I have had it for
today - seriously, i know about my > limited abilities to program -
probably I have made a > very small - but yet undiscoverable mistake - i
am > sorry for bothering you like a spammer - but i don't > get
it? > > Thank you very much in advance, > >
Torquaine
Yahoo! Groups Links
Yahoo! India Matrimony: Find your life partner
online. |