Possible to set Analysis filter watchlist and range using new AnalysisDoc object?


#1

I would like to run scans programatically based on certain watchlist and set range to, say, past 5 days.

From the documentation https://www.amibroker.com/guide/objects.html
it seems I have to use the Analysis object which has properties like;

Properties:
Property Filter(ByVal nType As Integer, ByVal pszCategory As String) As Long [r/w]

Properties:

RangeMode As Long
RangeN As Long
RangeFromDate As Date
RangeToDate As Date
ApplyTo As Long

However, the Analysis object is obsoleted. Is it possible to use the new AnalysisDoc to set watchlist and range? If not, I can still use the Analysis object.


#2

As wrote many times, ALL settings (including filter and range) are part of Analysis project file (APX). So you don’t need to set anything separately. Just load APX file and everything is already there.


#3

Thank you for the quick reply which solved my problem.