[amibroker] SetBarsRequired to initialize arrays starting at a past date

 

How can I set the number of required bars to include a specified date in the past, but no more bars than necessary?


The date in the past is always many years before the start of the backtest range.


dateTime1990 = _DT("1990-01-01");

dateTimeEndOfRange = EndValue(DateTime());

bars = BarsBetween(dateTime1990, dateTimeEndOfRange);  // imaginary function

setbarsrequired(bars);

Cum(event);  // number of events since 1990


__._,_.___

Posted by: hydroblue@rocketmail.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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


.

__,_._,___


EmoticonEmoticon