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

domodo 1111938 at qq.com
Sun Sep 14 09:24:18 CEST 2014


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.



More information about the R-SIG-Finance mailing list