Ken,
 
Frankly speaking number of bars is usually diferent than testing period
because AA window uses all bars regardless of range setting,
but if you want to have even more than "all" bars for current stock, you would
need to use "Pad and align" feature of Automatic Analysis window.
 
To do so go to AA->Settings, select some index with very long history
(exceeding your maximum requirements), such as ^DJI in
"Reference symbol" , check "Pad and align to reference symbol" box and then run your formula as usual.
 
When this is turned on, all symbols' quotes are padded and aligned to reference symbol.
This way each symbol history length becomes equal to that of reference symbol. Non existing data bars
prior to first available date are filled NULLs. Remaining non existing bars are padded with previous valid bar
data:
 

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Ken Close
Sent: Tuesday, November 07, 2006 1:57 PM
Subject: [amibroker] Arrays With Different Number of Bars than Total Bars

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
__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to