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

[amibroker] Re: STREXTRACT only works on comma separated lists??



PureBytes Links

Trading Reference Links

These days I would say Python + NumPy takes the cake. It can bridge to R if you really need it, but is otherwise far more flexible and has none of the legacy problems with being linked through heritage to S.

--- In amibroker@xxxxxxxxxxxxxxx, "janhausd" <janhaus.dresden@xxx> wrote:
>
> Brian,
> 
> R and MatLab are both widely used for array processing (and time-series), and each has a read function which allows the specification of a delimiter character.
> 
> Read.delim in R:
> http://pbil.univ-lyon1.fr/library/base/html/read.table.html
> 
> textread command in Matlab:
> http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/textread.html&http://www.google.com/search?q=matlab+delimiter+character&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
> 
> Just two examples of how other array-based programs do it. While both of the programs mentioned above are tops in terms of pure numerical analysis, when you want to add buy/short/sell/cover conditions and put in any slightly complicated strategy then we turn to Amibroker.
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "brian_z111" <brian_z111@> wrote:
> >
> > > I'm definitely not saying this is the best way to do this
> > 
> > What do you think would be the best way to do this, in an array processing language designed to anlayse time based price series?
> > 
> > 
> > (theoretically speaking).
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "tuzo_wilson" <j.tuzo.wilson@> wrote:
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, "Conrad Joach" <consolejoker@>
> > > wrote:
> > > >
> > > > I have strings that are delimited by multiple char types. For instance
> > > I have arrays within arrays like so:
> > > >
> > > > field1,field2,field3,field4|field1,field2,field3,field4
> > > >
> > > > It would be nice if STREXTRACT would work like most modern versions of
> > > this type of string manipulation function and accept as an argument any
> > > arbitrary character.
> > > 
> > > I'm definitely not saying this is the best way to do this, but another
> > > option at your disposal is to enable script and use the split method of
> > > JScript:
> > > 
> > > 
> > > 
> > > EnableScript("JScript");
> > > 
> > > 
> > > 
> > > record = "1,2,3,14|15,6,7,28|29";
> > > 
> > > 
> > > 
> > > <%
> > > 
> > > var tempArr =  AFL.Var("record").split(',');
> > > 
> > > var splitArray = new Array();
> > > 
> > > 
> > > 
> > > for ( var i = 0, len = tempArr.length; i < len; i++ )
> > > 
> > > {
> > > 
> > >      // If the array value contains a pipe then re-split into a separate
> > > array
> > > 
> > >      // otherwise add to the "regular" array
> > > 
> > >      if (tempArr[i].indexOf('|') != -1)
> > > 
> > >      {
> > > 
> > >          AFL("splitArray" + i) = tempArr[i].split('|');
> > > 
> > >      }
> > > 
> > >      else
> > > 
> > >      {
> > > 
> > >          splitArray.push(tempArr[i]);
> > > 
> > >      }
> > > 
> > > }
> > > 
> > > 
> > > 
> > > AFL("splitArray") = splitArray;
> > > 
> > > %>
> > > 
> > > 
> > > 
> > > // Plots 1,2,3,6,7
> > > 
> > > Plot(splitArray,"SplitArray", colorBlue,styleLine);
> > > 
> > > 
> > > 
> > > // Plots 14,15
> > > 
> > > Plot(VarGet("splitArray3"),"SplitArray3", colorGreen,styleLine);
> > > 
> > > 
> > > 
> > > // Plots 28,29
> > > 
> > > Plot(VarGet("splitArray6"),"SplitArray6", colorRed,styleLine);
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Tuzo
> > >
> >
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

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