Open Interest Chart [LuxAlgo]

The Open Interest Chart displays Commitments of Traders %change of futures open interest, with a unique circular plotting technique, inspired from this publication Periodic Ellipses.


Open interest represents the total number of contracts that have been entered by market participants but have not yet been offset or delivered. This can be a direct indicator of market activity/liquidity, with higher open interest indicating a more active market.

Increasing open interest is highlighted in green on the circular plot, indicating money coming into the market, while decreasing open interests highlighted in red indicates money coming out of the market.

You can set up to 6 different Futures Open interest tickers for a quick follow up:


Circles are drawn, using plot(), with the functions createOuterCircle() (for the largest circle) and createInnerCircle() (for inner circles).

Following snippet will reload the chart, so the circles will remain at the right side of the chart:

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

Here is a snippet which will draw a 39-bars wide circle that will keep updating its position to the right.


n = bar_index
barsTillEnd = last_bar_index - n

if ta.change(chart.left_visible_bar_time ) or
    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)


  • Due to the inability to draw between bars, from time to time, drawings can be slightly off.
  • Bar-replay can be demanding, since it has to reload on every bar progression. We don't recommend using this script on bar-replay. If you do, please choose the lowest speed and from time to time pause bar-replay for a second. You'll see the script gets reloaded.



  • Toggle:
        • Enabled  -> uses the first column with a pre-filled list of Futures Open Interest tickers/symbols
        • Disabled -> uses the empty field where you can enter your own ticker/symbol

  • Pre-filled list: the first column is filled with a list, so you can choose your open interest easily, otherwise you would see COT:088691_F_OI aka Gold Futures Open Interest for example.
         If applicable, you will see 3 different COT data:
        • COT: Legacy Commitments of Traders report data
        • COT2: Disaggregated Commitments of Traders report data
        • COT3: Traders in Financial Futures report data

  • Empty field: When needed, you can pick another ticker/symbol in the empty field at the right and disable the toggle.

  • Timeframe: Commitments of Traders (COT) data is tallied by the Commodity ​Futures Trading Commission (CFTC) and is published weekly. Therefore data won't change every day.
         Default set TF is Daily


  • From middle:
        • Enabled (default): Drawings start from the middle circle -> towards outer circle is + %change, towards middle of the circle is - %change
        • Disabled: Drawings start from the middle POINT of the circle, towards outer circle is + OR -
        -> in both options, + %change will be coloured green, - %change will be coloured red.
        -> 0 %change will be coloured blue, and when no data is available, this will be coloured gray.

  • Size circle: options tiny, small, normal, large, huge.

  • Angle: Only applicable if "From middle" is disabled!
        -> sets the angle of the spike:

  • Show Ticker: Name of ticker, as seen in table, will be added to labels.

  • Text - fill
        • Sets colour for +/- %change

  • Table
        • Sets 2 text colours, size and position

  • Circles
        • Sets the colour of circles, style can be changed in the Style section.
           You can make it as crazy as you want:

Get Access to LuxAlgo indicators:

Join our 100k+ community:

All scripts & content provided by LuxAlgo are for informational & educational purposes only. Past performance does not guarantee future results.
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟