Posting the label for purchase/sale of an option on the graph of its underlying stock

UsedBits

New member
After searching for the following, I'm unable to find anything remotely resembling what I'm after. It is simple in concept: to see the purchase/sale of an option on the underlying stock's chart.

For example, on the chart for XYZ stock, I'd like to see a label with "+1 30Oct $20C @ $1.20 to open" in green with an arrow pointing to the bar representing the date and time of the purchase and a flatline extending from the bar to the right edge of the graph pointing to the price of the stock at the time of the purchase of the option. Conversely, a label with "-1 30Oct $20C @2.40 to close" in red with the same corresponding arrows pointing to date/time and stock price.

To code this, I'll need the variables, methods, functions, and whatever else:

1. To use the stock symbol of the chart being displayed to search the table of option purchase transactions for the time range displayed on the chart
2. Option Trade Price
3. Stock Price
4. Date/time of transaction
5. Display a label on the date and time of an option's transaction with an arrow pointing to the price of the stock at the time of the transaction
a. color a 'Buy' in green
b. color a 'Sell' in red

This is my first attempt at coding a ThinkScript. My preference would be to be pointed in the right direction so that I might go more directly to find these things - as opposed to slogging through the meager descriptions of the rich set of variables, methods, functions, and so on the the script help facility.
 

Similar threads

Top