Day Trading SPY if at 10:30am this index is at +.2%
Author: buckeye50
Creation Date: 8/27/2009 4:06 PM
profile picture

buckeye50

#1
Wanted to backtest strategy that buys at market the SPY if at 10:30am this index is at +.2% then sell at 3:30pm at market.

Any suggestion on how to use Wealth Lab to create these strategy rules.

Thank you
profile picture

Cone

#2
This assumes that a bar is sure to form at 10:30. For the best results, just use 30-minute intervals.

Note that the trades will show up as taking place on the next bar; 11am and 4pm bar for 30-minute intervals. But keep in mind that it uses Market orders, so these trades actually occur on the first tick of those intervals, which is the same as 10:30 and 3:30 for practical purposes.

You need to install Community.Components from Extensions for this to run without error.

CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).