Auto generation of option chains and charting

I can figure out the details but I wanted to make sure it was okay before finding out some detail that's going to cause conflict with a real-time running Amibroker process.

What I'm planning to do is this:

  1. Some key sequence where I can click in the Y-axis label area of a stock "from" and "to" price and then have all of the current weekly call and put option chain symbols generated. If any option symbols in that range were previously created then they would be skipped over (obviously).

  2. Click some key sequence on a price in the Y-axis label area and a new chart, same timeframe as the stock chart I'm clicking in, will popup a chart of the nearest call or put option chain will be created. They key sequence would determine whether it would be a call or put chart.

It would involve accessing the Amibroker object model and I'm asking if there's something I shouldn't do with this approach which could adversely affect the currently running Amibroker process which is connected to the IBController during live market hours.

[There was a forum thread here that I can't find which talked about someone clicking on a line out of multiple lines in a chart where each line represented a different symbol and clicking on one would cause a separate chart of it to be created. That's probably related to what I need to do to load the new chart programatically.]

Thanks for any tips before I start coding it. I'll share the code once it's done. It should be helpful to others here. Those US option symbols are horrific to type in by hand with so many to do per week per stock of interest.

@SteveH, I think the thread you were looking for is this one.

1 Like

Fantastic. Thanks!

From that code, looks like I need to have the 2nd chart already up and know the chartid since I can't manipulate any GUI elements of Amibroker through the COM interface.

Auto-generation of symbols for option chains may be of use to others. Looks like a good opportunity to also play around with the Python plugin.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.