Open Interest Chart

Jun 8, 2023

Static chart image
Volume Based
Works on the following platforms:
tradingviewSymbolTradingView
For free use on the TradingView platform
ninjatraderNinjaTrader
For free use on the NinjaTrader platform
metatrader4MetaTrader 4
For free use on the MetaTrader 4 platform
metatrader5MetaTrader 5
For free use on the MetaTrader 5 platform
thinkorswimThinkorswim
For free use on the Thinkorswim platform

The Open Interest Chart is an innovative trading indicator that visually represents the percentage change of futures open interest using a circular plotting technique, drawing inspiration from the concept of Periodic Ellipses. This method allows traders to easily discern changes in market activity, as open interest reflects the total number of unclosed contracts in a market.

How to Trade the Open Interest Trading Indicator?

indicator image

In trading, open interest is crucial as it indicates the level of activity and liquidity in a given market. When open interest rises, it typically signifies an inflow of money into the market, depicted in green on the chart. Conversely, a decrease in open interest, shown in red, suggests that money is exiting the market.

With this indicator, traders can track up to six different Futures Open Interest tickers simultaneously, making it easier to stay informed about market movements.

Indicator Details and Code Implementation

The indicator uses a series of circles, plotted via the plot() function, utilizing two main functions: createOuterCircle() for the largest circle representation and createInnerCircle() for inner circles. This design ensures that circles are consistently placed at the chart’s right side, keeping the data timely and relevant.

Here's a technical snippet illustrating the circle-creating mechanism, ensuring it updates correctly:

if ta.change(chart.left_visible_bar_time ) or
   ta.change(chart.right_visible_bar_time) 
    n := bar_index

The below code details how a 39-bar wide circle updates in position, demonstrating the dynamic nature of this visualization:

//@version=5
indicator("")

n = bar_index
barsTillEnd = last_bar_index - n

if ta.change(chart.left_visible_bar_time ) or
   ta.change(chart.right_visible_bar_time) 
    n := bar_index
    
createOuterCircle(radius) => 
    var int end   = na
    var int start = na
    var basis     = 0.
    barsFromNearestEdgeCircle   = 0.
    barsTillEndFromCircleStart  = radius
    startCylce                  = barsTillEnd % barsTillEndFromCircleStart == 0            // start circle    
    bars                        = ta.barssince(startCylce)                                                              
    barsFromNearestEdgeCircle  := barsTillEndFromCircleStart -1 
    basis   := math.min(startCylce ? -1 : basis + 1 / barsFromNearestEdgeCircle * 2, 1)    // 0 -> 1                    
    shape    = math.sqrt(1 - basis * basis) 
    rad      =      radius     /  2
    isOK     = barsTillEnd <= barsTillEndFromCircleStart and  barsTillEnd >  0
    hi       = isOK ? (rad + shape * radius) - rad : na
    lo       = isOK ? (rad - shape * radius) - rad : na
    start   := barsTillEnd     == barsTillEndFromCircleStart ? n -1 : start
    end     := barsTillEnd     == 0  ? start + radius : end 

    [hi, lo, start +1, end]

[h, l, s, e] = createOuterCircle(40)

plot(h), plot(l)

Market Limitations

  • The indicator's visuals can at times be slightly misaligned due to the restriction of drawing only on bars, not between them.
  • Utilizing bar-replay might demand considerable processing power, as the chart needs to reload consistently with each bar's evolution. If necessary, it's advisable to run bar-replay on the lowest speed and occasionally pause to let the script refresh.

Indicator Settings and Customization

Ticker Options

  • Toggle: • Enabled: Use pre-set symbols for Futures Open Interest tickers. • Disabled: Input your own custom ticker or symbol.

  • Pre-filled list: Quickly select your Futures Open Interest ticker from a ready-made list or opt for custom entries. Options include: • COT: Legacy Commitments of Traders report data • COT2: Disaggregated Commitments of Traders report data • COT3: Traders in Financial Futures report data

  • Timeframe: COT data, orchestrated by the CFTC, is updated weekly, hence the daily timeframe setup as default.

Styling Features

  • From middle: • Enabled (default): Begins drawing from the middle going outward. • Disabled: Starts from the center point of the circle with optional angles.

    • Positive %change is marked in green, negative in red, neutral (0% change) is blue, and no data conditions appear gray.
  • Circle Size: Adjust circle dimensions to tiny, small, normal, large, or huge.

  • Angle: Relevant when "From middle" is disabled, allowing angle adjustments for the representation spike. indicator image

  • Ticker Display: Add ticker names directly on chart labels for clarity.

  • Text and Fill Options: Designate color schemes for % change and table information.

  • Circle Customization: Beyond color changes, tailor the style and presentation as desired: indicator image

FAQ

How do you access the Open Interest Chart indicator?

  • You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

This Open Interest Chart offers a nuanced yet clear approach to understanding market interest and fluctuations, tailored for both novice and expert traders aiming to optimize their trading strategy through informed decisions.

Trading is risky and many will lose money in connection with trading activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other markets involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools for charting platforms, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content or tool we provide.

Charts used on this site are by TradingView in which the majority of our tools are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com. TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2025 LuxAlgo Global, LLC.