Please fill suggestion at the feedback center. Thank you. Best regards, Tomasz Janeczko amibroker.com ----- Original Message ----- From: Mike To: amibroker@yahoogroups.com Sent: Wednesday, May 20, 2009 6:37 AM Subject: [amibroker] Re: TJ - WishList - bar charts in cells of Explore
Bummer. I'm getting rounding errors at 9 digits so that my 1's start turning into other values. It might be nice to see support for this by introducing a new format constant to the AddColumn function and doing the number of characters calculation internally. The output could then be done using '|' instead of '1'. e.g. AddColumn(ARRAY, Name, formatBarGraph); Ideally, negative values would be accepted too such that the valid range is -100..+100, centered at zero. We could then combine it with some color control (e.g. red negative values, green positive values) to get a nice looking bar chart column. |||| ||||| || ||| Mike --- In amibroker@yahoogroups.com, "Mike" <sfclimb...@...> wrote: > > I suspect that the more common request would be to have the function return an array for bar by bar results. > > Based on that assumption, the problem with coding our own Rept function is that we cannot add text, that changes bar by bar, to an exploration. > > In order to get an Exploration to give bar by bar output comparable to the original graph we could use some creative coding and generate a graph using the numerical values 1, 11, 111, etc. > > In the following example it is assumed that: > > - The values to be plotted have all been normalized to be within the range 0..100 > - Floating point precision is limited to 16 characters and thus 100% can at best be represented by 16 bars. This means that each '1' of the bar graph represents 100/16 = 6.25%. > > The approach would then be to use powers of 10 to add 1's to the graph column and a format string of 16.0 to truncate any remaining decimal places. > > In this example, RSI is used since it is already normalized as per the first assumption. > > Pattern = 0.1111111111111111; > Exponent = floor( RSI() / ( 100 / 16 ) ); > Graph = Pattern * ( 10 ^ Exponent ); > > Filter = 1; > AddColumn( RSI(), "RSI" ); > AddColumn( Exponent, "Exponent" ); > AddColumn( Graph, "Graph", 16.0 ); > > Last thing to do would be to try and get rid of the commas in the graph. > > Mike > > --- In amibroker@yahoogroups.com, "Tomasz Janeczko" groups@ wrote: > > > > Hello, > > > > You can implement it on your own: > > > > function Rept( string, howmany ) > > { > > result = ""; > > for( i = 0; i < howmany; i++ ) result += string; > > return result; > > } > > > > > > > > > > Best regards, > > Tomasz Janeczko > > amibroker.com > > ----- Original Message ----- > > From: "gmorlosky" gmorlosky@ > > To: amibroker@yahoogroups.com > > Sent: Tuesday, May 19, 2009 8:57 PM > > Subject: [amibroker] TJ - WishList - bar charts in cells of Explore > > > > > > > TJ: > > > > > > What is the possibility of enhancing the Explore spreadsheet wiht this technique: > > > http://infosthetics.com/archives/2006/08/excel_in_cell_graphing.html > > > > > > which is a simple repeat of characters to create bar charts > > > REPT("|",percentage) > > > > > > > > > > > > ------------------------------------ > > > > > > **** 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 > > > > > > > > > > > >