PROTECTED SOURCE SCRIPT
Aggiornato

RoboCOT [by Oberlunar]

62
RoboCOT by Oberlunar is a visual analytics indicator that compares two Commitment of Traders (COT) reports using TradingView’s official `TradingView/LibraryCOT` (dynamic requests enabled and thank you TV devs!)


RoboCOT is designed to help you inspect relative positioning between Commercials (C) and Noncommercials (NC) across two futures symbols in a consistent, normalised space.

The script does not provide trade signals, does not predict outcomes, and does not guarantee performance. COT data is typically updated weekly and can be revised; for that reason, it should be interpreted as a higher-timeframe positioning dataset and always cross-checked with price, volatility, and broader context.

The RoboCOT Oscillators
The upper lane shows four oscillators constrained to the range [-1, +1]. Two lines belong to Asset A (NC and C) and are drawn with stronger colours, while the two lines of Asset B are drawn fainter to act as a reference. Each oscillator is derived from net positioning (Long minus Short) expressed relative to Open Interest, then normalised over a rolling lookback of weekly prints and smoothed with either HMA or EMA. This normalisation is meant to make different markets more comparable visually; it is not the raw net position itself. In addition, the oscillators are modulated by an internal confidence factor that incorporates Open Interest activity and distance from historical extremes, so the plotted curves remain continuous while still reflecting when the underlying positioning is “more informative” in relative terms.

The RoboCOT Comparisons
The shaded areas in the upper lane are pair fills that compare A versus B within the same participant class. The NC fill is drawn between the two NC lines, and the C fill is drawn between the two C lines. The sign of each fill is driven by the product A×B (after any optional bias inversion on B). When the product is positive, both series share the same sign and the fill leans toward the “agreement” palette; when the product is negative, the series have opposite signs, and the fill leans toward the “conflict” palette. Opacity is driven by a weight that increases with higher confidence, larger separation between curves, and stronger agreement/conflict magnitude; when the weight is low, the fill remains intentionally subtle.

The optional “Invert B bias” switch is provided because some pairings represent opposite sides of the same macro axis. A common example is comparing 6E1! EUR (Euro FX futures) against DX1! DXY (US Dollar Index futures). In that case, flipping the sign of B can make the comparison more intuitive by expressing both series in a consistent “bias space” for visual alignment checks. This is a visualisation convenience; it does not imply a causal relationship.

The RoboCOT Fragility Score
The lower lane displays a fragility comparison for the two assets. In this implementation, fragility is derived from the COT concentration metrics (Top 4 and Top 8 net concentration, combined), normalised into [-1, +1] and then smoothed. The fill between the two fragility lines is OI-driven and uses a pressure proxy based on net-longness (a normalised long-share minus short-share) for each asset. The yellow line is Asset B ( DX1! , inverted in this setup) and the purple line is Asset A ( 6E1! ). In the lower lane, yellow is closer to the midline (≈ -2.0), while purple is further away (more negative). Since the engine applies the fragility penalty using abs(fragOsc), the line that is farther from the centre (higher |fragOsc|) is the one that is “more fragile” under this metric. So A (Euro FX) looks more fragile than B (Dollar Index) in this snapshot. But... fragility here is not a price-direction signal, and it’s not meant to track EURUSD one-to-one. It’s a positioning concentration diagnostic (Top4/Top8 concentration imbalance, normalised and smoothed). A higher fragility magnitude means positions are more crowded/concentrated, which can imply higher vulnerability to squeezes, regime shifts, or mean-reversion, but it doesn’t force EURUSD to go up or down on its own.

An example of the RoboCOT Usage
In this chart, Noncommercials on both legs (EURO and inverted DXY) are positive, which suggests that speculative positioning is aligned with EUR strength / USD weakness rather than fighting it. At the same time, Commercials are negative on both legs, a configuration that often appears when hedgers are positioned against the prevailing move, so I treat it as “trend still supported but monitored” rather than a reversal call. On the other side, the fragility lane shows the EURO side more stretched than the DXY side, meaning the EUR leg looks more concentration-sensitive, so a loss of NC alignment or a rise in fragility would be the first warning that the price move could become unstable.



by Oberlunar 👁★
Note di rilascio
Small bug-fix on the first lane directional colour (Asset A).
Note di rilascio
another small bug fix.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.