little arrows on quantmod charts

6 messages Options
Embed this post
Permalink
Wind2

little arrows on quantmod charts

Reply Threaded More More options
Print post
Permalink
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]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Mark Breman-3

Re: little arrows on quantmod charts

Reply Threaded More More options
Print post
Permalink
Hi Wind,
Have a look at the this:

if(!is.null(xlseries)) plot(addTA(xlseries, on=1, type='p', pch=25,
col="green", bg="green", legend=""))
if(!is.null(xsseries)) plot(addTA(xsseries, on=1, type='p', pch=24,
col="red", bg="red", legend=""))
if(!is.null(elseries)) plot(addTA(elseries, on=1, type='p', pch=24,
col="green", legend=""))
if(!is.null(esseries)) plot(addTA(esseries, on=1, type='p', pch=25,
col="red", legend=""))

where elseries is a xts series with enter long signals, xlseries is a xts
series with the exit long signals etc.

HTH,

-Mark-

2009/10/23 Wind <[hidden email]>

> 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]]
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Wind2

Re: little arrows on quantmod charts

Reply Threaded More More options
Print post
Permalink
Thanks Mark.
It's exactly what I need.

Wind

On Fri, Oct 23, 2009 at 1:45 PM, Mark Breman <[hidden email]> wrote:

> Hi Wind,
> Have a look at the this:
>
> if(!is.null(xlseries)) plot(addTA(xlseries, on=1, type='p', pch=25,
> col="green", bg="green", legend=""))
> if(!is.null(xsseries)) plot(addTA(xsseries, on=1, type='p', pch=24,
> col="red", bg="red", legend=""))
> if(!is.null(elseries)) plot(addTA(elseries, on=1, type='p', pch=24,
> col="green", legend=""))
> if(!is.null(esseries)) plot(addTA(esseries, on=1, type='p', pch=25,
> col="red", legend=""))
>
> where elseries is a xts series with enter long signals, xlseries is a xts
> series with the exit long signals etc.
>
> HTH,
>
> -Mark-
>
> 2009/10/23 Wind <[hidden email]>
>
>> 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]]
>>
>> _______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only.
>> -- If you want to post, subscribe first.
>>
>
>

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Jeff Ryan

Re: little arrows on quantmod charts

Reply Threaded More More options
Print post
Permalink
In reply to this post by Wind2
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 <[hidden email]> 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]]
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>



--
Jeffrey Ryan
[hidden email]

ia: insight algorithmics
www.insightalgo.com

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Mark Breman-3

Re: little arrows on quantmod charts

Reply Threaded More More options
Print post
Permalink
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 <[hidden email]>

> 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 <[hidden email]> 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]]
> >
> > _______________________________________________
> > [hidden email] mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only.
> > -- If you want to post, subscribe first.
> >
>
>
>
> --
> Jeffrey Ryan
> [hidden email]
>
> ia: insight algorithmics
> www.insightalgo.com
>
> _______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.
Jeff Ryan

Re: little arrows on quantmod charts

Reply Threaded More More options
Print post
Permalink
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 <[hidden email]> 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 <[hidden email]>
>>
>> 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 <[hidden email]> 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]]
>> >
>> > _______________________________________________
>> > [hidden email] mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> > -- Subscriber-posting only.
>> > -- If you want to post, subscribe first.
>> >
>>
>>
>>
>> --
>> Jeffrey Ryan
>> [hidden email]
>>
>> ia: insight algorithmics
>> www.insightalgo.com
>>
>> _______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only.
>> -- If you want to post, subscribe first.
>
>



--
Jeffrey Ryan
[hidden email]

ia: insight algorithmics
www.insightalgo.com

_______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.