How to query MACD parameters from Excel

Dear All,

I have an excel file that contains list of MACD parameters for each of ticker name.
Kindly need your help how to display this macd chart that automatically changes the parameters based on my excel.
Thank you.

Surya

@suryarobertson it is not clear to me if you want to choose tickers in AmiBroker and then plot a MACD based on parameters data that you "dynamically" get from Excel (with AmiBroker controlling Excel automation) or you want to simply select a cell in an Excel sheet and then update a chart in AmiBroker.

Using Excel Automation can be a little tricky. To get you started if you have access to the old Yahoo group see this discussion thread and study its attachments.

For the second scenario, you could arrange your MACD parameters in contiguous cells (where each row will have the ticker in column A, the Fast period in col B, the Slow in C and the Signal in D).
Then, each time a cell is selected in column A (at row x, in the range where you have the tickers), you could trigger some VBA code to write the appropriate (Bx, Cx, Dx) row data to a file (like a short "include" .afl file) and then update the main ticker in the AmiBroker active chart.

How to do it was explained in this past thread. The OLE update will also trigger a re-evaluation of the include file.

Dear @beppe,

Thank you for your solution. The second scenario is more likely of what i'm looking for but i'm hoping that the trigger is not from the excel but from the Amibroker it self. Excel is just where i put my row data of parameters.

So basically i kindly need your help for an AFL how to lookup from my Excel file where i put my parameters for each of tickers so whenever in Amibroker i want to plot a Chart or run an Exploration or Backtest then Amibroker would refer that ticker's parameters based on that Excel.

Thank you for your help.