amibroker java script export image error

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");
ABDOCS = AB.Documents;

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)


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.

Are you a day trader?