Happy holiday to all,
I got 2 things to accomplish and need guidance from the experienced here:
- to create a new chart window with a default chart template
- to switch from one window, let say an Analysis window to another window, e.g. an existing chart window that is already open
I tried to find examples of jscript with amibroker but they are quite limited.
the best code that I can find is below:
// I need to open Amibroker first, then execute this script
ab = new ActiveXObject("Broker.Application");
// close any open charts in Amibroker.
docs = ab.Documents() ;
// close any open AA in Amibroker.
adocs = ab.AnalysisDocs() ;
ab.loadLayout ( "C:\\Program Files\\AmiBroker\\forex-hist\\Layouts\\PALiveAnalysis.awl");
ab.AnalysisDocs.Open( "C:\\Program Files\\AmiBroker\\Formulas\\Include\\PALower.apx" );
ab.AnalysisDocs.Open( "C:\\Program Files\\AmiBroker\\Formulas\\Include\\PATrading.apx" );
ab.AnalysisDocs.Open( "C:\\Program Files\\AmiBroker\\Formulas\\Include\\PAHigher.apx" );
ab.AnalysisDocs.Open( "C:\\Program Files\\AmiBroker\\Formulas\\Include\\PAExtraLarge.apx" );
your guidance is very much appreciated.