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

Dmitry Kishkinev dmitry.kishkinev at gmail.com
Mon Apr 4 15:16:07 CEST 2016


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]]



More information about the R-SIG-Finance mailing list