[R-SIG-Finance] little arrows on quantmod charts

Jeff Ryan jeff.a.ryan at gmail.com
Fri Oct 23 19:50:04 CEST 2009


Hi Mark,

The issue isn't the R code, it is the device (and the underlying R
graphics engine).

This won't be readily doable, at least not in the true sense.
quantmod wasn't meant to replace RT charting, it was (like R) designed
to analyze data in R _as if_ you had it in a typical charting
platform.

The new use of a custom internal 'layout' will allow for updates
without redrawing the screen, but that has limits too.  Since R uses a
paint approach (overlying), you can get some strange artifacts.

When R gets a better device, I will likely rewrite to take advantage
of it.  I am not inclined to simply replicate what is available
elsewhere though (much to the surprise of some... :) )

Replotting everything every minute or so would probably be tolerable
of course... but tick by tick flashing/redraw would make your office
into a 1970's disco.

Best,
Jeff



On Fri, Oct 23, 2009 at 12:39 PM, Mark Breman <breman.mark at gmail.com> wrote:
> Hi Jeff,
> I was thinking about if it would be possible to chart streaming price data
> with the new engine. For instance candles that get updated tick by tick as
> prices come in. I know from other development tools and charting libraries
> that it is very important for speed to have a renderer that does not render
> the entire chart, but only the areas that changed.
> Would something like that be possible with the new engine?
> Regards,
> -Mark-
>
> 2009/10/23 Jeff Ryan <jeff.a.ryan at gmail.com>
>>
>> While this isn't yet in the released version of quantmod, the entire
>> graphical engine underlying charting via quantmod is being rewritten.
>>
>> The net effect is that it will now render as one graphic, so enabling
>> the use of charts inside of standard mfcol/layout plot regions, as
>> well as a more robust mechanism regarding how additions get appended
>> to charts.  Things are much faster and quite a bit more pleasing to
>> the eye now.
>>
>> Another facet of the new engine is that it will allow for base
>> graphics to be more easily incorporated _into_ the charts.  I will be
>> adding wrappers to make the process easy, but it will be possible even
>> without them.  Currently this is a challenge in the current system
>> (even for me -- having a decent knowledge of what I wrote.)
>>
>> I will also add a mechanism to add more common types of additions,
>> like signals.  Requests for additional features would be much
>> appreciated!!
>>
>> Brave souls are invited to contact me for access and a quick example
>> or two before the release.  All code is on R-forge as well.
>>
>> Best,
>> Jeff
>>
>>
>>
>> On Fri, Oct 23, 2009 at 12:21 AM, Wind <windspeedo99 at gmail.com> wrote:
>> > Stock charts in quantmod are as good as other commercial softwares'.
>> > Yet I wonder how to add little arrows to the barChart.   Something as
>> > http://www.trendprognosis.com/wp-content/uploads/2009/05/VLE0612.gif
>> > Sometimes little arrows are better than shaded area on the charts.
>> >  Several kinds of arrows for buy, sell, stop, warning would be enough.
>> > Thanks.
>> >
>> > Wind
>> >
>> >        [[alternative HTML version deleted]]
>> >
>> > _______________________________________________
>> > R-SIG-Finance at stat.math.ethz.ch mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> > -- Subscriber-posting only.
>> > -- If you want to post, subscribe first.
>> >
>>
>>
>>
>> --
>> Jeffrey Ryan
>> jeffrey.ryan at insightalgo.com
>>
>> ia: insight algorithmics
>> www.insightalgo.com
>>
>> _______________________________________________
>> R-SIG-Finance at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only.
>> -- If you want to post, subscribe first.
>
>



-- 
Jeffrey Ryan
jeffrey.ryan at insightalgo.com

ia: insight algorithmics
www.insightalgo.com



More information about the R-SIG-Finance mailing list