Buy on previous bar(s)?
Author: wpalermo
Creation Date: 1/17/2010 1:42 PM
profile picture

wpalermo

#1
Is there a way to make buys on bars previous to the current bar? (I want to backtest only)
I have several different setup/buy signals some require buys on previous bars.
D I need to create a new strategy for each scenario?
I am not a programmer, so am nearly clueless!
Thanks
profile picture

Eugene

#2
QUOTE:
I have several different setup/buy signals some require buys on previous bars.

Like "if some condition today = true", then "buy yesterday" ? :)
profile picture

wpalermo

#3
Exactly what I am looking for. Is it possible to do for backtesting?
I just started fooling around with this yesterday and am having a hard time getting my head around flow of time, if you know what I mean.
profile picture

Eugene

#4
Yes, it's possible - we call it "peeking into the future".
profile picture

wpalermo

#5
Ha Ha I see what you mean. So I need to test every one of my setup patterns before I move to either a buy or to the next bar. Correct?
profile picture

Eugene

#6
Yes, you need to test for a setup on the current bar. Take a look at this KB article:

Bars, Loops, and Bar + 1
profile picture

wpalermo

#7
Thanks for the info.
This is all way over my head, but I'll plug away at it.
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).