PureBytes Links
Trading Reference Links
|
Tomasz,
thank you for the detailed info.
I was totally out of the SelectedValue( array )function. [4.10 to
4.40 was a hard time to follow upgrades and your speed is a bit below
c...]
The interesting side effect of this discussion is that there was a
pre-4.46 solution to my question Re:strextract() function with
variable item.
Now I have already two [equivalent ?]alternatives for
x=Cum(1)%10;// the variable item
List=GetCategorySymbols(categoryGroup,254);
// w=StrExtract(List,x);// Error 2: bad arguments
y=StrExtract(List,SelectedValue(x));
z=StrExtract(List,StrToNum(NumToStr(x)));
Both y and z give the same result to this need to "read" the name of
the stock. I will follow the SelectedValue, since you say it is faster
[I hope you donīt expect from me to understand the pseudo-C
description !!!]
The StrToNum(NumToStr(x)) is closer to my EXCEL experience, I was
often using the Value(text) function together with the concatenate().
In final analysis, the metamorphose of a number to text and number
again is always impressive for a non-programmer...
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx>
wrote:
> Dimitris,
>
> OK, my mistake, sorry.
>
> As to your second question:
>
> > Plot(SelectedValue(L),"Moving Line",4,1);
> > is one line, just like the
> > Plot(StrToNum(NumToStr(L)),"Moving Line",4,1);
> > and I can not see what is "simpler".
> > If there are some dangers/caveats for both NumToStr(), StrToNum()
> > functions please advise.
>
> No caveats but it simply does not make sense to do this unnecessary
conversion
> that takes additional time. StrToNum( NumToStr( array) ) is
essentially (in pseudo - C):
>
> char buffer[ 50 ];
> sprintf( buffer, "%g", SelectedValue( array ) );
> number = atof( buffer );
>
> It just takes longer.
>
> SelectedValue is all that is needed and just what should be used in
this place.
>
> Also selectedvalue function was here since version 4.10 so it is
advised
> to use (where possible) functions that are present in earlier
versions to allow
> the users of old versions to run the formula.
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Sunday, October 26, 2003 7:25 PM
> Subject: [amibroker] Re: Did you ever...
>
>
> > Tomasz,
> > What ReadMe do you use ?
> > I use
> > AmiBroker 4.46.0 Beta Read Me
> > October 22, 2003 19:05
> >
> > AFAIK, it is the most recent [for us]
> > In this text, I see
> >
> > CHANGE LOG
> > CHANGES FOR VERSION 4.46.0 (as compared to 4.45.0)
> > New AFL functions
> >
> > *added NumToStr as synonum of WriteVal (as this function did
> > not 'write' anything, just returned string)
> > *added StrToNum( string ) - converts string to numbe
> >
> > and I do not see something similar to
> > # NumToStr uses "SelectedValue".#
> > Am I missing something or do you expect [from us] to read ReadMes
> > from the future ?
> > On the other side, it seems you don't like so much the use of
both
> > NumToStr(), StrToNum() functions. Is there any special reason ?
> > Because your
> >
> > Plot(SelectedValue(L),"Moving Line",4,1);
> > is one line, just like the
> > Plot(StrToNum(NumToStr(L)),"Moving Line",4,1);
> > and I can not see what is "simpler".
> > If there are some dangers/caveats for both NumToStr(), StrToNum()
> > functions please advise.
> > Dimitris Tsokakis
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko"
<amibroker@xxxx>
> > wrote:
> > > Dimitris,
> > >
> > > As written in the read me NumToStr uses "SelectedValue".
> > >
> > > Exactly the same could be achieved simpler:
> > >
> > > Plot(C,"C",1,64);
> > > Plot(SelectedValue(L),"Moving Line",4,1);
> > >
> > >
> > > Best regards,
> > > Tomasz Janeczko
> > > amibroker.com
> > > ----- Original Message -----
> > > From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
> > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > Sent: Sunday, October 26, 2003 6:50 PM
> > > Subject: [amibroker] Did you ever...
> > >
> > >
> > > > ...need this ?
> > > >
> > > > Plot(C,"C",1,64);
> > > > Plot(StrToNum(NumToStr(L)),"Moving Line",4,1);
> > > >
> > > > Move your cursor from bar to bar and see...
> > > > [amibroker 4.46.0 required]
> > > > Dimitris Tsokakis
> > > >
> > > >
> > > >
> > > > 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
> > > >
> > > > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> > > >
> > > >
> > > >
> >
> >
> >
> > 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
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs from home.
Over 14,500 titles. Free Shipping
& No Late Fees. Try Netflix for FREE!
http://us.click.yahoo.com/ybSovB/hP.FAA/3jkFAA/GHeqlB/TM
---------------------------------------------------------------------~->
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 http://docs.yahoo.com/info/terms/
|