RE: [amibroker] How can i define the symbol on Windows Scripting Host

 

Have you selected and saved the watch list that you want to run with the apx file?

 

From: amibroker@yahoogroups.com [mailto:amibroker@yahoogroups.com]
Sent: Sunday, June 05, 2016 12:02 PM
To: amibroker@yahoogroups.com
Subject: [amibroker] How can i define the symbol on Windows Scripting Host

 

 

Hello,

I have a folder with some models and i want to backtest them automatically so i execute this:

APXFolder = "C:\\MYAPXFOLDER"; // MODIFY TO FIT YOUR SETUP

/* WScript.Echo("Batch testing of all AFL files stored in " + AFLFolder ); */

var AB, AA;
var fso, f, f1, fc, s;
var filename;

AB = new ActiveXObject( "Broker.Application" ); // creates AmiBroker object
fso = new ActiveXObject("Scripting.FileSystemObject");

/* Iterate through all files in the folder */
f = fso.GetFolder(APXFolder);
fc = new Enumerator(f.files);
for (; !fc.atEnd(); fc.moveNext())
{
// we need to add empty string to make sure that filename is a string object
filename = "" + fc.item();

try
{
NewA = AB.AnalysisDocs.Open( filename ); // opens previously saved analysis project file
Stock=
// NewA represents the instance of New Analysis document/window

if ( NewA )
{
NewA.AFL(
NewA.Run( 2 ); // start backtest asynchronously

while ( NewA.IsBusy ) WScript.Sleep( 500 ); // check IsBusy every 0.5 second

NewA.Close(); // close new Analysis
}
}
catch ( err )
{
WScript.echo( "Exception: " + err.message ); // display error that may occur
}

}

The problem i have is that it backtests the afl models on just one random Symbol for example PEPSI. But i really don't need PEPSI, i need GOOG.
How can i specify the symbol?

Please advice,

__._,_.___

Posted by: "TA" <tagroups@sbcglobal.net>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

**** 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