PureBytes Links
Trading Reference Links
|
Is it possible to create an array that has a different number of bars than
the total bars in a test period?
I want to take the equity line (or price line) and "assemble" an array of
the close values only when a buy signal is in effect.
Take a Buy and Sell signal, and collect the closing prices of the current
symbol ONLY WHEN the buy signal is in effect.
Assume further that over a 1000 bar backtest, the Buy signal is on for 600
bars and the Sell signal is on for 400 bars. The total number of bars in
the test is 1000.
How can one "stack up" the buy periods so they are "end to end" rather than
being interspersed with Sell periods?
The resulting "During Buy" array would only have 600 bars.
All I can think of (conceptually) is manipulation of bar numbers and
addition of the bar number only when the Buy signal is on.
Is any of this possible?
Thanks for any comment.
Ken
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.11/542 - Release Date: 11/20/2006
|