This calculates Charm Exposure per passage of 1 day. (Might add a version that calculates based on passage of 1 hour.) Based on open interest.
(Currently it only works for option contracts in the current month.)
The Charm Exposure is displayed in millions.
Charm Exposure based on Open Interest:
Option's Charm * Contract Size * Open Interest * Spot Price
Total Charm Exposure = Call Charm Exposure + Put Charm Exposure
Charm Exposure based on Live Volume:
Option's Charm * Contract Size * Volume * Spot Price
Total Charm Exposure = Call Charm Exposure + Put Charm Exposure
To install:
# Click the Trade tab then All Products.
# Enter SPY and press enter.
# Click Layout then Customize.
# Click the scroll icon next to one of the Custom indicators.
# Give it a Column name: CharmX or CEX
# Click thinkScript Editor
# Paste the code. Select Apply and Ok.
# Select the Add Items button. Then Ok and done.
**** Make sure D (Day) is selected. To the right of the column name.