jpg/gif auto screenshots of charts

#1
Good day to all.

I have found this script below that saves your chart as .gif file. it works fine, but can someone please help me how to trigger this script after a BUY signal. I would like amibroker to take a screenshot of the chart after a macd line crossover on the signal line. I have read the AMI user's guide but still can't figure this out.

outputdrive = "C:\\temp\\";
saveimage = outputdrive;
var oAB = WScript.CreateObject("Broker.Application");
Ticker = oAB.ActiveDocument.Name;
AB = new ActiveXObject("Broker.Application");
Win = AB.ActiveWindow;
output=saveimage + Ticker + ".gif";
Win.ExportImage( output, 1280, 1024 );

I hope the forums experts can help me out on this coding problem.
Thanks in Advance.
 

Similar threads