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

[amibroker] Re: Static variables example



PureBytes Links

Trading Reference Links

Thanks, just wondered as I try to see a use for these new functions.

I created the separate AB installation for the intraday because of concern
of the data corrupting each other. I have had it this way since beginning of
last year. I did have problems initially with the settings overriding each
other when they were in one installation and after asking what was best to
do, I went with separate installations.

Cheers,
Graham
http://e-wire.net.au/~eb_kavan/

-----Original Message-----
From: Tomasz Janeczko [mailto:amibroker@xxxxxx] 
Sent: Sunday, July 11, 2004 4:22 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: Global Parameter??

Graham,

No. These variables are visible in ONE running instance.

You are speaking about inter-process communication (exchanging
data between different programs running in different address spaces)
and it is much, much slower, prone to synchronization problems, etc.

I don't see the reason why wouldn't it be better just to import your 
EOD data into intraday database and use one instance (you can use
different tickers for EOD data). This is just faster and easier.

Or use mixed EOD/Intraday mode ? Even easier.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Graham" <gkavanagh@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, July 11, 2004 8:22 AM
Subject: RE: [amibroker] Re: Global Parameter??


> A second question on this. 
> 
> I have separate installations for my EOD and intraday data, would the
global
> variables created in the EOD be read by the intraday if both are running.
> This would make setting trigger levels easier for breakout signals.
> 
> For example the variable would be Name() and Price for a watchlist of
stocks
> each with its own break price. 
> 
> 
> Cheers,
> Graham
> http://e-wire.net.au/~eb_kavan/
> 
> -----Original Message-----
> From: Graham [mailto:gkavanagh@xxxxxxxxxxxxx] 
> Sent: Saturday, July 10, 2004 7:49 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] Re: Global Parameter??
> 
> Thanks Tomasz and William.
> You have to run an AFL in AA or even IB first then they are stored in
> memory.
> 
> This program just keeps on getting new features, and here I am still
trying
> to get the simple timeframe functions working.
> 
> Cheers,
> Graham
> http://e-wire.net.au/~eb_kavan/
> 
> -----Original Message-----
> From: Tomasz Janeczko [mailto:amibroker@xxxxxx] 
> Sent: Saturday, July 10, 2004 6:59 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: Re: [amibroker] Re: Global Parameter??
> 
> Graham,
> 
> In RAM memory. They 'live' as long as AB is running.
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: "Graham" <gkavanagh@xxxxxxxxxxxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Saturday, July 10, 2004 12:40 PM
> Subject: RE: [amibroker] Re: Global Parameter??
> 
> 
> > These new features have me confused. There is no file name called up, so
> > where are these variables located?
> > 
> > Cheers,
> > Graham
> > http://e-wire.net.au/~eb_kavan/
> > 
> > -----Original Message-----
> > From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@xxxxxxxxx] 
> > Sent: Saturday, July 10, 2004 5:46 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: Global Parameter??
> > 
> > Ned, Ara,
> > We can use now the new StaticVarSet() function.
> > As we read in the 4.58 ReadMe
> > ** Static variable - the variable has static duration (it is 
> > allocated when the program begins and deallocated when the program 
> > ends)
> > and initializes it to Null unless another value is specified. Static 
> > variables allow to share values between various formulas.
> > Only NUMBER and STRING static variables are supported now (not 
> > ARRAYS).**
> > We may also use Param() in a "master" code
> > 
> > //Master
> > StaticVarSet("per",Param("per",10,10,50,10));
> > Plot(MA(C,StaticVarGet("per")),"st",1,1);
> > 
> > and use it in any "slave" IB window
> > 
> > //Slave1
> > Plot(MA(C,StaticVarGet("per")),"st",1,1);
> > 
> > or
> > 
> > //Slave2
> > Plot(EMA(C,StaticVarGet("per")),"st",1,1);
> > 
> > Dimitris Tsokakis
> > --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
> > wrote:
> > > Ara,
> > > This would not give a "global" action [in the sense Ned probably 
> > > wants].
> > > Suppose you save in your Ti3 folder the
> > > A=Param("A",10,10,50,10);
> > > Y=LinRegSlope(C,A);
> > > as LINREG.afl.
> > > Now paste in 2 empty IB windows the same
> > > 
> > >  #include "C:\Ti3\LINREG.afl";
> > > Plot(Y,"Y",1,1);
> > > 
> > > If you set A=40 in the first graph, it does not affect the 2nd.
> > > You should set A value in every single indicator.
> > > As far as I understand, Ned would like to set A once and see this 
> > > setting in ANY indicator using A.
> > > I do not see how this could be done.
> > > Dimitris Tsokakis
> > > --- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxxx> 
> > wrote:
> > > > Try using the parameter code in a separate file and bring that 
> > file 
> > > in each
> > > > indicator as an #include file.
> > > > 
> > > > ----- Original Message ----- 
> > > > From: "recce101" <ned@xxxx>
> > > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > > Sent: Wednesday, June 30, 2004 10:20 PM
> > > > Subject: [amibroker] Global Parameter??
> > > > 
> > > > 
> > > > > I have a considerable number of right-click user-defined 
> > > parameters
> > > > > in my custom indicators, and frequently two or three indicators
> > > > > displayed together have similar parameters which need to be 
> > > adjusted
> > > > > at the same time. For example,
> > > > >
> > > > > LinearRegressionPeriod=Param("LR period",10,5,40,1);
> > > > >
> > > > > might be used for custom indicators in three separate AFL files.
> > > > > Currently I must right-click each indicator separately and 
> > adjust 
> > > its
> > > > > linear regression parameter to the value desired. I'm looking 
> > for 
> > > a
> > > > > way to define a "global" parameter which would be recognized by 
> > > all
> > > > > three indicators, so one right-click adjustment would suffice 
> > for 
> > > all
> > > > > three. This would be similar to how the setting in a Preferences
> > > > > window affects all indicators linked to that setting, except 
> > that
> > > > > these would be user-defined parameters not found in the set of 
> > > built-
> > > > > in Preferences. My search through the help files 
> > using "parameter"
> > > > > and "global" did not answer my question, though I must confess 
> > > that I
> > > > > did not fully understand a good portion of what I read.
> > > > >
> > > > > There must be a way to do this, and it's probably very simple, 
> > so 
> > > I
> > > > > would appreciate being pointed in the right direction.
> > > > >
> > > > > Ned
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Check AmiBroker web page at:
> > > > > http://www.amibroker.com/
> > > > >
> > > > > Check group FAQ at:
> > > > http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > > > > Yahoo! Groups Links
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > 
> > 
> > 
> > 
> > Check AmiBroker web page at:
> > http://www.amibroker.com/
> > 
> > Check group FAQ at:
> > http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > 
> > 
> > 
> > Check AmiBroker web page at:
> > http://www.amibroker.com/
> > 
> > Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> > Yahoo! Groups Links
> > 
> > 
> > 
> >  
> > 
> > 
> 
> 
> 
> Check AmiBroker web page at:
> http://www.amibroker.com/
> 
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 
> Check AmiBroker web page at:
> http://www.amibroker.com/
> 
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 
> Check AmiBroker web page at:
> http://www.amibroker.com/
> 
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 



Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links



 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

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

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