Indicator / Index levels

Map percentage moves onto CFD prices.

Translate the underlying market’s percentage move into levels on your Nasdaq 100 or S&P 500 CFD chart.

SVKO CFD NQ-ES LevelsIndicesCFDsOpen source + commercial licence · SVKO 1.0
Worked example: percentage levels on a CFD chart
WORKED EXAMPLE
TRADENATION:USTECCFD price 20,240
NASDAQ:QQQDaily change +1.20%
0% basis20,240 ÷ 1.012 = 20,000
Current price 20,240 · +1.20%+1% · 20,2000% · 20,000−1% · 19,800

The reference move sets the CFD basis at the first valid live snapshot. Levels stay fixed while the price label moves. This example uses chosen ±1% levels.

Why I built it

I prefer working with my CFD chart around futures rollovers, but the CFD and the reference market do not share the same price scale. I need percentage moves translated onto the chart I actually use. This is my workflow preference, not a guarantee that CFDs avoid rollovers or broker adjustments.

How it solves the problem

Levels reconstructs the mapped symbol’s daily percentage change and calculates a 0% basis on the CFD chart. Other percentage levels sit above and below that basis. A current price label shows the chart price’s distance from it.

During the default New York weekday session, 09:30 to 16:00, NQ/ES defaults use QQQ and SPY. Outside that session they use the configured NQ, MNQ or ES futures. IG, Trade Nation and Trade Nation SB pairs are included. Active local mappings take priority over Mapper fallback.

Define the levels you use

DEFAULT = -ATR/2 to ATR step 1
TRADENATION:USTEC = -ATR/2 to ATR+1 step 0.5

Use explicit values, ascending or descending ranges, or ATR endpoints. ATR is the chart symbol’s last confirmed daily ATR(14), not the mapped symbol’s ATR. The script always includes 0%, removes duplicates and permits up to 50 unique levels. Exact chart overrides replace the default definition.

Stocks are a secondary configurable use: provide an appropriate mapping or Mapper counterpart. Native charts use their own ticker. The primary examples here remain NQ and ES.

A snapshot, not a historical signal

The first valid live basis is cached for the active calculation symbol. Reloading, changing inputs or changing that symbol can create a different basis. Historical bars cannot reproduce the exact moment of the earlier snapshot. The moving price label remains live.

Feeds, sessions, spreads, currencies and permissions can cause differences. Unresolved mappings or unavailable daily data leave the display empty. Invalid level syntax shows a configuration error rather than partial levels. No alert conditions are defined.

Credits

Original work by SVKO. Open source + commercial licence: free personal use, including trading for your own profit; company and work use require a separate paid agreement. See the licence terms.

GET STARTED

Add it to TradingView.

Set up on desktop for the workflow documented here. TradingView mobile can render Pine indicators, but the author has not reviewed or tested their mobile output. You can read these guides and browse the source on a phone.

Free for personal trading. Company or employment use requires a paid agreement before use. Licence terms and commercial enquiries ↗

  1. Add Levels to the intended NQ or ES CFD chart.
  2. Check the During main session and Outside main session source mappings.
  3. Keep a DEFAULT row in Level definitions and add exact chart overrides if needed.
  4. Use the optional Mapper only when the active local source mapping has no match.

The source copy is also available on GitHub. Read the licence supplied with the source before installation.

OPEN SOURCE + COMMERCIAL LICENCE / SVKO 1.0

Source code and contributions

Use, study and modify the source free for personal use, including trading real money for your own profit. Company and work use, including internal use, bundling, hosting and free distribution to clients, require a separate paid agreement. Read the licence and contact the author. Source available; not an OSI open-source licensing model. Keep the licence and applicable notices.