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

RE: [amibroker] Re: static variables per symbol in AB?



PureBytes Links

Trading Reference Links




<FONT face=Tahoma 
size=2>-----Original Message-----From: mmqp 
[mailto:mmqp@xxxxxxxxx]Sent: Sunday, March 09, 2003 8:21 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Re: 
static variables per symbol in AB?
Jayson,I have a customed indicator which begins at different 
bar for each stock. <FONT color=#0000ff 
face=Arial size=2> 
 
Is this a 
calculation or just a number you wish to use? If a calculation just set a 
variable to the calculation
<SPAN 
class=897594003-10032003> 
<SPAN 
class=897594003-10032003>example; to determine the bar that is exactly 1/3 
of the whole chart
<SPAN 
class=897594003-10032003> 
<SPAN 
class=897594003-10032003>x=cum(1)/3;
  

Now 
your indicator can draw that number automatically from any stock. If on the 
other hand you want a static number for each of a few stocks you could string 
together IIf statements...
<SPAN 
class=897594003-10032003> 
<SPAN 
class=897594003-10032003>x=iif(name()=="CSCO",100,iif(name()=="MSFT",125,iif(name()=="GE",300,0)));
<SPAN 
class=897594003-10032003> 
If 
you are doing 100 stocks this is obviously not a solution but for a 
few....
<SPAN 
class=897594003-10032003> 
<SPAN 
class=897594003-10032003>jayson
 
  Instead of recalculating 
this start bar each time I call up the stock; I'd like to store this bar 
somewhere (preferably in AB database) and restore it back into the 
variable.  This is only one usage that I can think of.I have 
never used the foreign function.  Do you have an example?  
Thanks--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" 
<jcasavant@xxxx> wrote:> I am not sure I understand what you are 
trying to do but you can store data> to a composite then call that 
data as a foreign function....> > Jayson> -----Original 
Message-----> From: mmqp [mailto:mmqp@xxxx]> Sent: Sunday, March 
09, 2003 10:03 AM> To: amibroker@xxxxxxxxxxxxxxx> Subject: 
[amibroker] static variables per symbol in AB?> > > Does 
anyone try to emulate static variables in AB by using scripts?> I suppose 
one way is to write these values to a file.  Can I create> these 
variables and store them within AB symbol database; so when I> access the 
database these variables will readily available without> reading from 
files.> > Thanks> > 
>       Yahoo! Groups 
Sponsor>             
ADVERTISEMENT> > > > > Send BUG REPORTS to 
bugs@xxxx> Send SUGGESTIONS to suggest@xxxx> 
-----------------------------------------> Post AmiQuote-related messages 
ONLY to: amiquote@xxxxxxxxxxxxxxx> (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)> 
--------------------------------------------> Check group FAQ at:> 
<A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.Send 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT









Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.