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

RE: [amibroker] writeif in functions ?



PureBytes Links

Trading Reference Links

Andreas,

The NAME of the parameter is used to IDENTIFY this parameter.
It is like a variable NAME in the code. Variable name has to be fixed because it is
used to IDENTIFY it.

It can not change because then you won't have one but hundreds/thousands parameters
if you scanned through your entire database.

It is beyond me why you would want to implement such weirdness.

Isn't it just better / easier and obvious to write:

CompareTicker = ParamStr( "Compare with:", CompareTickerDefault );

You know what the current ticker is ! It is displayed in the CAPTION of the chart window
so there is NO reason to display it again in the parameter window other than
WASTING display space for repeating the information that is already there.

So my answer is *NO*. I won't implement such useless functionality.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "wecus" <member@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, May 21, 2004 9:28 PM
Subject: [amibroker] Re: How to control behaviour of Paramstr() ?


> Tomasz,
> 
> TX for your fast reply, even if it isn't what I wanted to hear <g>. 
> Taking your firm response ('No' instaed of 'Maybe') I assume it 
> can't be cotrolled through VB as well.
> 
> This of course brings up my next question/suggestion - would it be 
> possible to implement something like this inside an indicator window? 
> Either as a 'delete_variable()' or maybe event-driven through a 
> script like 'on_LBtn_click', 'on_next_stock' 
> or 'do_only_once_until_whatever'...
> 
> There are actually many things I can imgine where I would wish for 
> more 'interactive' capabilities within AB, maybe I could propose this 
> in general for future development work?
> 
> Thanks again for your efforts
> Andreas
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx> 
> wrote:
> > Hello,
> > 
> > The answer is no.
> > 
> > Please read the function reference:
> > http://www.amibroker.com/f?params
> > 
> > It says:
> > WARNING: default/min/max/step parameters have to be CONSTANT 
> numbers. This is because these values are cached and are not re-read
> > during subsequent formula evaluations.
> > 
> > The same applies to name and all other Param flavours.
> > 
> > 
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message ----- 
> > From: "wecus" <member@xxxx>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Friday, May 21, 2004 2:51 PM
> > Subject: [amibroker] How to control behaviour of Paramstr() ?
> > 
> > 
> > > For relative comparison of two stocks I use this code to set up a
> > > default:
> > >
> > > if (GroupID() == 6 OR GroupID() == 7 )
> > >     CompareTickerDefault = "^GDAXI";
> > > else
> > >     CompareTickerDefault = "^IXIC";
> > >
> > > then I set the variable to be processed later using paramstr():
> > >
> > > CompareTicker = ParamStr( "Compare "+Name()+"
> > > with:",CompareTickerDefault);
> > >
> > > This way an individual variable get's initialized for each stock 
> (as
> > > can be watched by pressing CTRL-R) as I cycle through my 
> database. To
> > > get around this I tried dropping the 'name()':
> > >
> > > CompareTicker = ParamStr( "Compare with:",CompareTickerDefault);
> > >
> > > Unfortunately this doesn't refresh as it should, it looks like
> > > CompareTicker is evaluated only once and then cached from there 
> on.
> > > Is there a way to tell AB to flush the cache or delete the 
> variable
> > > every time I select a new stock?
> > >
> > > TIA
> > > Andreas
> > >
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > 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
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> 
> 
> 
> 
> 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 
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 


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 
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/