[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] Security Data Function Problem (2nd)



PureBytes Links

Trading Reference Links

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 Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/