[R-SIG-Finance] Fwd: questions about adaptive indicator, intra-day trading and package 'parallel'

amarjit chandhial a.chandhial at btinternet.com
Thu Sep 25 21:48:56 CEST 2014


Has anybody managed to recreate this stratgey using quantstrat ?


Amarjit



----Original message----
>From : 1111938 at qq.com
Date : 14/09/2014 - 08:24 (GMTST)
To : r-sig-finance at r-project.org
Subject : Re: [R-SIG-Finance] questions about adaptive indicator, intra-day trading and package 'parallel'

braverock, I'm trying to code a hans123-like strategy, be unfamiliar with
fine control in R and quantstrat, it's hard for me to code the rules below.
could you help to give me an example ?

1. market opens at 9:00, closes at 15:00, and the trading period is 1-min
2. determine hband = highest high of the day at 9:30 (that's, the highest
high of the recent 30 min at 9:30 )
3. determine lband = lowest low of the day at 9:30 (that's, the lowest low
of the recent 30 min at 9:30 )
4. from 9:31 to 14:55, if close of the 1-min bar cross above hband, enter
long; if close cross under lband, enter short;
5. if positon is long,and close cross under hband/2+lband/2, exit long; if
position is short,and close cross above hband/2+lband/2, exit short;
6. exit all position at 14:55
7. having 2 loss trades, stop trading today.

regards,



--
View this message in context: http://r.789695.n4.nabble.com/questions-about-adaptive-indicator-intra-day-trading-and-package-parallel-tp4696562p4696923.html
Sent from the Rmetrics mailing list archive at Nabble.com.

_______________________________________________
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.



More information about the R-SIG-Finance mailing list