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

[amibroker] AmiBroker 4.60.1 BETA released



PureBytes Links

Trading Reference Links

Ara,
Ara,
There was no problem in the inverse procedure.
Just remember to keep the
            VarSet->Apply->VarGet
sequence.
1. In an empty IB window define the static variables per00 to per99

for(i=0;i<10;i++)
{
for(j=0;j<10;j++)
{
StaticVarSet( "per"+WriteVal(i,1.0)+WriteVal(j,1.0), 10*i+j);
}
}

2. Hit Apply to activate them.
3. Now in the commentary window paste the

WriteVal(StaticVarGet("per00"),1.0);
WriteVal(StaticVarGet("per04"),1.0);
WriteVal(StaticVarGet("per12"),1.0);
WriteVal(StaticVarGet("per99"),1.0);
WriteVal(StaticVarGet("per143"),1.0);

The result is the expected, ie

0
4
12
99
{EMPTY}

The program recognizes per00 to per99 according to the StaticVar 
definitions and does not know anything about per143.
It is cool !!
Dimitris Tsokakis


--- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxxx> wrote:
> Dimitris,
> 
> thanks for looking into this and your code....
> 
> I tested it and it work OK on my system also ... however
> 
> I was trying to do the opposite....
> 
> I want to define a StaticVar in an indicator and access it to the 
GURU
> window.
> 
> My app is that I want to define the trade condition that I surmise 
from the
> indicator and write them to the GURU window ... this may seem an 
app for
> using the interpretation window, but I don't want to pay the price 
of AB
> generating an extra processing cycle ... because this is all in 
real time.
> 
> Should the StaticVar info transfer work in the direction of 
indicator to
> GURU also?
> 
> I have not been able to do this.
> 
> Thanks
> 
> Ara
> ----- Original Message ----- 
> From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Wednesday, July 28, 2004 12:41 AM
> Subject: [amibroker] Re: Guru - Static Variables
> 
> 
> > Ara,
> > I wrote in Commentary the
> > StaticVarSet("gra",50);
> > WriteVal(StaticVarGet("gra"));
> >
> > and then, in an empty IB window the
> >
> > k=StaticVarGet("gra");
> > Plot(MA(C,k),"MA"+WriteVal(k,1.0),1,1);
> > Plot(MA(C,50),"",colorRed,8);
> >
> > Everything was fine, no problem at all.
> > In the next amibroker run you should only open again the 
commentary
> > window, to "activate" the static var.
> > [When the static var definition is in an IB window, it is auto-
> > activated in the beginning]
> > Dimitris Tsokakis
> > --- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxxx> 
wrote:
> > > Trying to access static variables from Guru Commentary window.
> > >
> > > I can only access one of the 5 variables That I set in an 
indicator
> > window.
> > >
> > > Are the Static variable accessible from the GURU Commentary 
window?
> > >
> > > Thanks
> > >
> > > Ara
> >
> >
> >
> >
> > 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/