Hello all
I have been running a specific OLE code for a while now and today for the last couple of days have been getting the error below... I am not sure what this means, can anyone please help me try figure it out?
Some background:
-
I have a .js that I run daily that runs multiple scans in a sequence and adds/removes symbols from watchlists, performs some rankings, finds some patterns... nothing too wild. Code at the bottom.
-
The formulas saved in each .apx are all AFL and all have an #include_once statement
#include_once "Formulas\Custom\Functions and Procedures.afl" -
Using Norgate for my main database, Yahoo (just a few symbols) and experimenting with Tiingo (new).
I don't "think" I have done anything new recently except give Tiingo free a shot...
Please help
AB = new ActiveXObject("Broker.Application");
Project1 = "C:\\Amibroker\\Scripts\\Settings\\1-Maintenance.apx"
NewA = AB.AnalysisDocs.Open(Project1);
if (NewA) {
NewA.Run(0);
while (NewA.IsBusy)
WScript.Sleep(500);
NewA.Close();
}
Project2 = "C:\\Amibroker\\Scripts\\Settings\\2-Universe.apx"
NewA = AB.AnalysisDocs.Open(Project2);
if (NewA) {
NewA.Run(0);
while (NewA.IsBusy)
WScript.Sleep(500);
NewA.Close();
}
// repeated 5 more times...
Since the error occurs at the 1-Maintenance.apx file (first one) I thought that maybe pasting it below would help also... this is ran on current symbol, one bar.
StaticVarRemove("Scan*");
StaticVarRemove("Rank*");
Watchlist0=30;
Watchlist1=Watchlist0+1;
Watchlist2=Watchlist0+2;
Watchlist3=Watchlist0+3;
for (i=Watchlist0;i<=Watchlist3;i++) {
for (u=0;(Symbol=StrExtract(CategoryGetSymbols(categoryWatchlist,i),u))!="";u++) {
CategoryRemoveSymbol(Symbol,categoryWatchlist,i);
}
}
WatchlistName0="Universe";
WatchlistName1="Flags";
WatchlistName2="Top";
WatchlistName3="Pivots";
CategorySetName(WatchlistName0,categoryWatchlist,Watchlist0);
CategorySetName(WatchlistName1,categoryWatchlist,Watchlist1);
CategorySetName(WatchlistName2,categoryWatchlist,Watchlist2);
CategorySetName(WatchlistName3,categoryWatchlist,Watchlist3);