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

Re: [amibroker] sublimely naive? Manual Stock Sorting.



PureBytes Links

Trading Reference Links

Thanks.
         Michael.

At 03:48 PM 10/10/2003 +0200, you wrote:
>Michael,
>
>For the same reason: there are NO arrays of strings in AFL. All string 
>functions / arithmetic
>give you SINGLE string (not array of strings).
>
>To achieve what you want you would need to use NUMERIC column:
>
>AddColumn( Status("stocknum") * 1000 + BarIndex(), "sortcol" );
>
>Best regards,
>Tomasz Janeczko
>amibroker.com
>----- Original Message -----
>From: <mailto:OzFalcon@xxxxxxxx>Michael.S.G.
>To: <mailto:amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx
>Sent: Friday, October 10, 2003 3:18 PM
>Subject: Re: [amibroker] sublimely naive? Manual Stock Sorting.
>
>Tomasz,
>
>So Date() must be doing the same thing - returns single string.
>
>Im unsure as to why the following code doesn't work though....?
>
>Sort = Name()+" "+BarIndex();
>AddTextColumn( sort,"Sort");
>AddColumn(BarIndex(),"BarIndex",1);
>
>KR
>         Michael.
>
>
>At 03:00 PM 10/10/2003 +0200, you wrote:
>>Graham,
>>
>>No, the reason for such behaviour is simple: WriteVal returns SINGLE
>>string (not array of strings) therefore can convert only SINGLE number
>>(not many) to string. The number converted is the 'selected value' of the 
>>array.
>>
>>See
>>http://www.amibroker.com/guide/afl/afl_view.php?name=SELECTEDVALUE
>>
>>What you are trying to do would involve WriteVal to return ARRAY of strings
>>(separate string for each day)
>>
>>Best regards,
>>Tomasz Janeczko
>>amibroker.com
>>----- Original Message -----
>>From: "Graham" <gkavanagh@xxxxxxxxxxxxx>
>>To: <amibroker@xxxxxxxxxxxxxxx>
>>Sent: Friday, October 10, 2003 2:53 PM
>>Subject: RE: [amibroker] sublimely naive? Manual Stock Sorting.
>>
>>
>> > It seems that the addcolumn using Valuewhen in it is only reporting 
>> the last
>> > event of Buy or Sell, not when the events happened
>> >
>> > Cheers,
>> > Graham
>> > http://groups.msn.com/ASXShareTrading
>> > http://groups.msn.com/FMSAustralia
>> >
>> >
>> > -----Original Message-----
>> > From: Michael.S.G. [mailto:OzFalcon@xxxxxxxx]
>> > Sent: Friday, 10 October 2003 8:25 PM
>> > To: amibroker@xxxxxxxxxxxxxxx
>> > Subject: RE: [amibroker] sublimely naive? Manual Stock Sorting.
>> >
>> >
>> > Graham,
>> > This afl seems to have the same problem..
>> > see attached pic.
>> >
>> > KR
>> >          Michael.
>> >
>> > At 08:07 PM 10/10/2003 +0800, you wrote:
>> > >Michael
>> > >I just did a quick check to see what is possible, and it seems to work
>> > >sorting on the last column
>> > >
>> > >Buy=Cross(EMA(C,5),EMA(C,20));
>> > >Sell=Cross(EMA(C,20),EMA(C,5));
>> > >
>> > >Filter=Buy OR Sell;
>> > >AddColumn(Buy,"buy",1);
>> > >AddColumn(Sell,"sell",1);
>> > >AddTextColumn( WriteVal(ValueWhen(Buy OR Sell,DateNum()),1)+"
>> > >"+Name(),"sort column");
>> > >
>> > >Cheers,
>> > >Graham
>> > >http://groups.msn.com/ASXShareTrading
>> > >http://groups.msn.com/FMSAustralia
>> > >
>> > >
>> > >-----Original Message-----
>> > >From: Michael.S.G. [mailto:OzFalcon@xxxxxxxx]
>> > >Sent: Friday, 10 October 2003 7:34 PM
>> > >To: amibroker@xxxxxxxxxxxxxxx
>> > >Subject: RE: [amibroker] sublimely naive? Manual Stock Sorting.
>> > >
>> > >
>> > >Double Tier Sort Must not be possible I guess.
>> > >
>> > >Michael.
>> > >
>> > >
>> > >At 11:53 AM 10/10/2003 +0800, you wrote:
>> > > >You can remove the builtin columns SetOption("NoDefaultColumns",1);
>> > > >Filter=1; AddTextColumn(Name(),"");
>> > > >
>> > > >Cheers,
>> > > >Graham
>> > > >http://groups.msn.com/ASXShareTrading
>> > > >http://groups.msn.com/FMSAustralia
>> > > >
>> > > >
>> > > >-----Original Message-----
>> > > >From: Michael.S.G. [mailto:OzFalcon@xxxxxxxx]
>> > > >Sent: Friday, 10 October 2003 10:22 AM
>> > > >To: amibroker@xxxxxxxxxxxxxxx
>> > > >Subject: RE: [amibroker] sublimely naive? Manual Stock Sorting.
>> > > >
>> > > >
>> > > >Hi Graham,
>> > > >   They all seem to do the same thing.
>> > > >
>> > > >I wonder how Tomasz gets it to display dates for each bar? Perhaps
>> > > >It's internal code (& Thats why you can't remove date or ticker
>> > > >columns).
>> > > >
>> > > >Im not sure if this is a bug or just my missunderstanding of AA.
>> > > >
>> > > >KR
>> > > >          Michael.
>> > > >
>> > > >
>> > > >
>> > > >At 07:11 AM 10/10/2003 +0800, you wrote:
>> > > > >Michael
>> > > > >The barnumber is
>> > > > >Barindex() or Cum(1)
>> > > > >You could also use Datenum()
>> > > > >
>> > > > >Cheers,
>> > > > >Graham
>> > > > >http://groups.msn.com/ASXShareTrading
>> > > > >http://groups.msn.com/FMSAustralia
>> > > > >
>> > > > >
>> > > > >-----Original Message-----
>> > > > >From: Michael.S.G. [mailto:OzFalcon@xxxxxxxx]
>> > > > >Sent: Thursday, 9 October 2003 11:12 PM
>> > > > >To: amibroker@xxxxxxxxxxxxxxx
>> > > > >Subject: RE: [amibroker] sublimely naive? Manual Stock Sorting.
>> > > > >
>> > > > >
>> > > > >Hi Graham,
>> > > > >This is a good solution. But the date gets Stuck. Im not sure why.
>> > > > >
>> > > > >Also, I thought perhaps displaying the name + bar number might
>> > > > >work, But I can't seem to figure out how to retrieve the bar
>> > > > >number.....?
>> > > > >
>> > > > >Here's what happens when combining the two.
>> > > > ><Attached pic)
>> > > > >
>> > > > >Stumped
>> > > > >          Michael.
>> > > > >
>> > > > >At 10:32 AM 9/10/2003 +0800, you wrote:
>> > > > > >You could try a double entry for a column, example
>> > > > > >AddTextColumn(Name()+" "+Date(),"");
>> > > > > >
>> > > > > >Cheers,
>> > > > > >Graham
>> > > > > >http://groups.msn.com/ASXShareTrading
>> > > > > >http://groups.msn.com/FMSAustralia
>> > > > > >
>> > > > > >
>> > > > > >-----Original Message-----
>> > > > > >From: Michael.S.G. [mailto:OzFalcon@xxxxxxxx]
>> > > > > >Sent: Thursday, 9 October 2003 10:05 AM
>> > > > > >To: amibroker@xxxxxxxxxxxxxxx
>> > > > > >Subject: [amibroker] sublimely naive? Manual Stock Sorting.
>> > > > > >
>> > > > > >
>> > > > > >Im looking to do a double tiered manual sort from my AA report.
>> > > > > >
>> > > > > >Quite simply, I wisthto sort by ticker, Then have each ticker
>> > > > > >entry sorted bydate.
>> > > > > >
>> > > > > >I'd rather not export into excel and multi sort that way. Has
>> > > > > >anyone got a workaround or some info I have possibly missed on
>> > > > > >doing this?
>> > > > > >
>> > > > > >Here is a snapshot of what I'd like to sort. Highlighted lines -
>> > > > > >as you can see, are not sorted by date.
>> > > > > >
>> > > > > >All The Best
>> > > > > >         Michael.
>> > > > >
>> > > > >
>
>
>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/)>http://groups.yahoo.com/group/amiquote/messages/)
>--------------------------------------------
>Check group FAQ at: 
><http://groups.yahoo.com/group/amibroker/files/groupfaq.html>http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
>
>
>Your use of Yahoo! Groups is subject to the 
><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
>
>
>Yahoo! Groups Sponsor
><http://rd.yahoo.com/M=259395.3614674.4902533.1261774/D=egroupweb/S=1705632198:HM/A=1524963/R=0/SIG=12o885gmo/*http://hits.411web.com/cgi-bin/autoredir?camp=556&lineid=3614674&prop=egroupweb&pos=HM>87358d1f.jpg 
>
>87358dc9.jpg
>
>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/)>http://groups.yahoo.com/group/amiquote/messages/)
>--------------------------------------------
>Check group FAQ at: 
><http://groups.yahoo.com/group/amibroker/files/groupfaq.html>http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
>
>
>Your use of Yahoo! Groups is subject to the 
><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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/ 


Attachment: Description: ""

Attachment: Description: ""