[R-SIG-Finance] entries/exits based on candlestick recognition

Ilya Kipnis ilya.kipnis at gmail.com
Mon Apr 4 16:30:51 CEST 2016

I believe there is an R package called candlesticks. Use that. Then, your
candlesticks are merely indicators which are merely R functions.

On Mon, Apr 4, 2016 at 9:16 AM, Dmitry Kishkinev <dmitry.kishkinev at gmail.com
> wrote:

> Dear all R-SIG readers
> I am learning Quantstrat now and wonder if anybody could point out examples
> where entries/exits were based on Japanese candlesticks' patterns.
> For example, I would like to back-test intraday momentum strategy when
> there was a large gap (previous day Close to given day Open) and during the
> first three 5-min candlesticks there were at least 2 candlesticks showing
> strong momentum. Say we have gap up and at least 2 candlesticks were
> Marubozu (Close = High) and/or Large White candlestick (Open-Close >= 66%
> of High-Low). One could imagine that such a strong momentum observed at day
> opening could hold for some time and one may try to 'ride on a hype' in the
> gap direction.
> One more thing I would like to implement in this back-testing is, once
> entered say long, I would like to apply a sophisticated stop trailing order
> which starts at a predefined risk (say, 1% of my Equity) and then it should
> follows the price based on the last 5-min candlestick. When it was again
> Marubozu and/or Large White candlestick I replace stop trailing order price
> with the one at the last candlestick Low and so on until the order is
> executed or I close before the day ends.
> Any snippets/examples related to the ideas mentioned?
> My rough idea I that I could introduce add.indicator and classify each
> 5-min candlestick and that then will be used for add.rule? Sorry, I am very
> new in Quantstrat.
> Thanks you so much in advance.
> Best regards
> Dmitry Kishkinev
> --
> PhD, Research Fellow,
> School of Biological Sciences,
> Bangor University,
> Bangor, Gwynedd, UK
> Email: dmitry.kishkinev at gmail.com;
> *d*.kishkinev at bangor.ac.uk <kishkinev at qub.ac.uk>
> Mobile phone: +44-(0)77-194-181-41
>         [[alternative HTML version deleted]]
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.

	[[alternative HTML version deleted]]

More information about the R-SIG-Finance mailing list