Little help is needed to modify the syntax

pkgmtnl

Well-Known Member
#1
the understated syntax export the jpg images to a local folder, but saves in name chart1.jpg, chart2.jpg....

My requirement is that it should save in the name of ticker it scans,

please advice.

EnableScript("jscript");
<%
function multiCapture()
{
AB = new ActiveXObject("Broker.Application");
ADS = AB.Documents;

// 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)
ADS.Item(0).ActiveWindow.SelectedTab = 0; //sheet 2 of tab 1
ADS.Item(0).ActiveWindow.ExportImage( "C:\\temp\\chart1.jpg", 800, 600);

ADS.Item(1).ActiveWindow.SelectedTab = 0; //sheet 3 of tab 2
ADS.Item(1).ActiveWindow.ExportImage( "C:\\temp\\chart2.jpg", 800, 600);

ADS.Item(2).ActiveWindow.SelectedTab = 0; //sheet 4 of tab 3
ADS.Item(2).ActiveWindow.ExportImage( "C:\\temp\\chart3.jpg", 800, 600);

ADS.Item(3).ActiveWindow.SelectedTab = 0; //sheet 2 of tab 1
ADS.Item(3).ActiveWindow.ExportImage( "C:\\temp\\chart4.jpg", 800, 600);

ADS.Item(4).ActiveWindow.SelectedTab = 0; //sheet 3 of tab 2
ADS.Item(4).ActiveWindow.ExportImage( "C:\\temp\\chart5.jpg", 800, 600);

ADS.Item(5).ActiveWindow.SelectedTab = 0; //sheet 4 of tab 3
ADS.Item(5).ActiveWindow.ExportImage( "C:\\temp\\chart6.jpg", 800, 600);

ADS.Item(6).ActiveWindow.SelectedTab = 0; //sheet 2 of tab 1
ADS.Item(6).ActiveWindow.ExportImage( "C:\\temp\\chart7.jpg", 800, 600);

}
%>

script = GetScriptObject();

if ( Status("action") == actionScan ) script.multiCapture();

Buy = 0;
 
#2
HI,

any one tell me can i add sound alert in amibroker when my price reach to our target price.

For eg. I purchase Bank nifty @ 11500 and my target is 11550 and stoploss is 11475.

I want set sound alert if price reach to 11550 and secound sound alert if price reach to my stop loss price 11475.

if any one know about these pls tell me.

Thanks
Kishor.
 

Similar threads