amibroker java script export image error

#1
sir i am using amibroker and third party utility for data provider . i require to generate live image from amibroker so that i can use in my own software utility.for that i am using amibroker object model with java script to access fuction of amibroker. and i did all my work.But PROBLEM is coming that image which its genrating is not live image means it generate last save data image which is saved in amibroker. that means if i click on save all data is update in amibroker and then after that when i run that java script i get latest image upto where i saved data. :mad: :mad:


AB = new ActiveXObject("Broker.Application");
AB.LoadDatabase("//address where third party Rt data is situated");
AB.SaveDatabase();
AB.RefreshAll();
ABDOCS = AB.Documents;


outputdrive="c:\\temp\\"
saveimage = outputdrive;

Ticker = AB.ActiveDocument.Name
output = saveimage + Ticker + ".png";



// Do not exceed number of active chart tabs.
// So if there are 3 chart tabs then max. number of Items is three, (0) to (2)

AB.SaveDatabase();
AB.RefreshAll();

ABDOCS.Item(0).ActiveWindow.SelectedTab = 0; //sheet 2 of tab 1
Ticker = ABDOCS.Item(0).Name;
output = saveimage + Ticker + ".png";
ABDOCS.Item(0).ActiveWindow.ExportImage( output, 800, 600);
 

Similar threads

Broker Special Offers

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Name:Phone:
Email:City:
State:
Are you a day trader?