Skip to main contentSkip to content
Squeeze Setups A live squeeze scanner built around the Slingshot Squeeze, with 22 years of backtest results behind it. See it, $99/month →
TOS Indicators
  • Tools

    Categories

    • Indicators
    • Backtesters
    • Scans
    • Dashboards
    • thinkScript
    • Member Resources
    Browse Full Library

    Featured Tutorials

    Fair Value Gap Indicator
    Fair Value Gap Indicator
    Indicators

    Download our free Fair Value Gap indicator for ThinkorSwim. It shades every...

    Learn more →
    False Breakout Scanner for ThinkorSwim (Free Scan Pair)
    False Breakout Scanner for ThinkorSwim (Free Scan Pair)
    Scans

    A two-scan pair that flags failed breakouts and failed breakdowns with volume...

    Learn more →
    Heiken Ashi Trend Indicator
    Heiken Ashi Trend Indicator
    Indicators

    Download our Custom Heiken Ashi indicator for ThinkOrSwim. Full ThinkScript code, formula...

    Learn more →

    Popular Posts

    Unusual Volume Pro Scans
    Unusual Volume Pro Scans
    Scans

    4 additional scans to find unusual volume overlapping with key...

    Learn more →
    High Short Interest Near 52 Week Highs (thinkScript)
    High Short Interest Near 52 Week Highs (thinkScript)
    Scans

    Build a simple scan in which to find stocks that...

    Learn more →
    Upcoming Earnings with High Short Interest
    Upcoming Earnings with High Short Interest
    Scans

    Build a scan to find stocks that are likely to...

    Learn more →
  • Courses
    Squeeze Course
    Squeeze Course
    19 Modules

    Scan, backtest, and trade the TTM Squeeze setup with precision.

    View Course →
    Earnings Course
    Earnings Course
    3 Modules

    Master earnings plays with free indicators and proven strategies for ThinkOrSwim.

    View Course →
    V-Shaped Reversals
    V-Shaped Reversals
    7 Modules

    Identify and trade powerful V-shaped reversal patterns with confidence and precision.

    View Course →
    Fibonacci Trading
    Fibonacci Trading
    4 Modules

    Learn to trade Fibonacci retracements and extensions in ThinkOrSwim effectively.

    View Course →
  • Products
    Futures Volatility Box Premium
    Futures Volatility Box

    Volatility models for 10 major futures markets, including the micros.

    Explore Futures VB →
    Stock Volatility Box Premium
    Stock Volatility Box

    Volatility levels for 600+ stocks and ETFs, with a live scanner.

    Explore Stock VB →
    Opening Range Breakouts Premium
    Opening Range Breakouts

    Scans 600+ stocks every 2 seconds for opening range breaks, with a backtester.

    Explore ORB Setups →
My Account
All Indicators
Beginner-Friendly 11 mins ThinkOrSwim

Cumulative Advance Decline Trading System for ThinkorSwim

A free cumulative advance decline indicator for ThinkorSwim. It tracks 6 symbols you pick and plots CCI-confirmed arrows on crosses of its 50-bar average.

Download Indicator
How to install in ThinkOrSwim →
Table of Contents
  • Key Takeaways
  • What Is a Cumulative Advance Decline Line?
  • What the Indicator Plots
  • How to Add It to ThinkorSwim
  • The Inputs
  • How the Code Works
  • Why the CCI Confirms the Signal
  • Examples From the Video
  • How I Use the Arrows
  • Ways to Extend the System
  • Common Problems and Fixes

In this tutorial I build a cumulative advance decline line for a group of 6 stocks in ThinkorSwim, then turn it into a simple trading system. On each bar, every symbol that closed above its previous close adds 1, every symbol that closed below it subtracts 1, and the study keeps a running total.

The video answers a viewer’s question: how do you make the symbols inputs, so you can swap a stock from the settings window instead of editing the code? From there I add a 50-bar average and arrows confirmed by the CCI. It was Episode 2 of our How to thinkScript series, so it suits traders learning thinkScript who want a breadth line for their own stocks.

Key Takeaways

  • The Cumulative Advance Decline Trading System is a free ThinkorSwim lower study that tracks 6 symbols. On each bar, a symbol that closed above its previous close counts +1, one that closed below counts -1, and TotalSum keeps the running total.
  • The 6 symbols are inputs, symbol_1 to symbol_6, so you change them in the study settings. The download defaults to FB, AMZN, AAPL, NFLX, GOOG and MSFT.
  • A second line, advDecLineAvg, is the 50-bar average of the cumulative line. On the daily chart in the video, that covers the past 50 days.
  • A bullish arrow prints when the line crosses above its average while the CCI is at +100 or higher. A bearish arrow prints on a cross below the average with the CCI at -100 or lower.
  • In the video, a bearish arrow on September 17 was followed by a drop in the 6-stock group soon after.

What Is a Cumulative Advance Decline Line?

A cumulative advance decline line is a running total of advancing issues minus declining issues. The classic version counts every stock on an exchange such as the NYSE. Each day, the number of stocks that closed up minus the number that closed down is added to the previous total, so a rising line means more stocks have been going up than down.

Our study applies the same counting to a group of 6 symbols you choose. That gives you a breadth line for your own basket, such as the largest tech stocks or the leaders of one sector. The table shows how the two compare.

Feature Classic advance decline line This study
What it counts Every advancing and declining stock on an exchange The 6 symbols in your inputs
What each bar adds Advancing issues minus declining issues +1 per symbol that closed up, -1 per symbol that closed down
Can you change the list? No Yes, from the study settings
Signals A line only Arrows on crosses of the 50-bar average, confirmed by the CCI

Market internals measure the breadth of the whole market. If you want those readings instead of a custom basket, our Supply Demand Edge indicator compares price to ThinkorSwim’s advance/decline spread ($ADSPD) and the NYSE TICK. Our Cumulative TICK indicator keeps a running total of the TICK through the day.

What the Indicator Plots

The Cumulative Advance Decline Trading System plots 4 things in its own panel below the price chart. The declare lower; line at the top of the code puts it there, because a running count of +1s and -1s is on a different scale from price.

Plot What it shows How it draws
advDecLine The running total of the 6 symbols’ +1 and -1 scores Line
advDecLineAvg The 50-bar average of advDecLine Line
bullishCrossOverSignal The line crossed above its average and the CCI is at +100 or higher Up arrow, weight 3, on the average line
bearishCrossOverSignal The line crossed below its average and the CCI is at -100 or lower Down arrow, weight 3, on the average line

How to Add It to ThinkorSwim

The Cumulative Advance Decline study is a custom study, so you either import the download or paste the code into a new study.

  1. Download the indicator, or copy the code from the Code tab on this page.
  2. In ThinkorSwim, click the Studies icon in the top right corner of the chart, then click Create.
  3. Give the study a name. I called mine anchored cumulative advance decline.
  4. Delete the placeholder code, paste in the full code, and click OK, then Apply.
  5. Open the study settings to set your 6 symbols and the start date.

If you haven’t added a custom study before, see our guide on how to import a study into ThinkorSwim.

The Inputs

The Cumulative Advance Decline study has 7 inputs: 6 symbols and a start date.

Input Default in the download What it controls
symbol_1 FB The first symbol in the group
symbol_2 AMZN The second symbol
symbol_3 AAPL The third symbol
symbol_4 NFLX The fourth symbol
symbol_5 GOOG The fifth symbol
symbol_6 MSFT The sixth symbol
startDateYyyyMmDd 2020120 The date the line starts, written as YYYYMMDD

The symbol defaults are the 6 stocks from the viewer’s starting code. FB was Facebook’s ticker when I recorded the video. The company now trades as META, so enter META in symbol_1 if you want to keep it in the group.

The start date default in the download has 7 digits, 2020120. GetYYYYMMDD() returns 8-digit dates, and every one of them is a larger number, so every bar passes the check and the line covers your whole chart.

Type a full 8-digit date, such as 20201201 for December 1, 2020, and bars before that day plot 0. Step 3 below explains what the line shows from that day on.

How the Code Works

The Cumulative Advance Decline code has 5 parts: the symbol inputs, a +1/-1 test for each symbol, the running total, the 50-bar average and the arrows. The viewer’s starting code already plotted the running total. Episode 1 of the series builds our anchored VWAP indicator, and you’ll find the rest of our thinkScript tutorials on one page.

Step 1: Make the Symbols Inputs

The starting code had each ticker typed into the code itself, so changing Amazon to Microsoft meant editing every place it appeared. The input keyword fixes that. Anything defined with input shows up in the study settings window, where you can change it without opening the code.

input symbol_1 = "FB";
input symbol_2 = "AMZN";
input symbol_3 = "AAPL";
input symbol_4 = "NFLX";
input symbol_5 = "GOOG";
input symbol_6 = "MSFT";

Then I replaced each quoted ticker with its input and renamed the variables to match: symbol1, symbol2 and so on. To test it, I changed the first symbol from Facebook to Twilio in the settings, clicked OK, and the line redrew using Twilio.

Step 2: Score Each Symbol

Each symbol gets 4 lines. The first two read its close on the current bar and on the bar before. The last two are true/false tests: did it close higher, or did it close lower?

def symbol1 = close(symbol_1);
def symbol11 = close(symbol_1)[1];

def symbol1a = symbol1 > symbol11;
def symbol1b = symbol1 < symbol11;

ThinkorSwim treats true as 1 and false as 0. So symbol1a - symbol1b is +1 when the symbol closed up, -1 when it closed down, and 0 when it closed unchanged. The other 5 symbols repeat the same 4 lines with their own numbers.

Step 3: Keep the Running Total

TotalSum adds a value up across the bars on the chart. Here it adds the 6 scores, so each bar moves the line by anywhere from -6 to +6. I renamed the plot from the viewer’s variable name to advDecLine.

input startDateYyyyMmDd = 2020120;
def beyondStartDate = if GetYYYYMMDD() >= startDateYyyyMmDd then 1 else 0;
plot advDecLine =  if beyondStartDate then TotalSum((symbol1a - symbol1b)+(symbol2a-symbol2b)+(symbol3a-symbol3b)+(symbol4a-symbol4b)+(symbol5a-symbol5b)+(symbol6a-symbol6b)) else totalsum(0);

Bars before the start date plot 0. The date check sits outside TotalSum, which adds on every bar either way. From the start date on, the line shows the total counted from your chart’s first bar. Common Problems below shows a fix.

Step 4: Add a 50-Bar Average

A cumulative line on its own doesn’t show whether the current reading is high or low for the group. To see what the line normally is, I compare it to its average over the past 50 bars. On the daily chart I used, that’s 50 days.

plot advDecLineAvg = Average(advDecLine,50);

Average is a simple moving average. Clicking Apply adds this second line to the panel.

Step 5: Add the Crossover Arrows

A cross through the average can mark a burst of momentum in the group, and the CCI confirms it. The bearish plot checks 3 things on one bar: the line is below its average, the line’s previous value was at or above the average, and the CCI is at -100 or lower.

plot bearishCrossOverSignal = if advDecLine < advDecLineAvg and advDecLine[1] >= advDecLineAvg and CCI() <= -100 then advDecLineAvg else double.nan;

plot bullishCrossOverSignal = if advDecLine > advDecLineAvg and advDecLine[1] <= advDecLineAvg and CCI() >= 100 then advDecLineAvg else double.nan;

When all 3 are true, the arrow sits on the average line.

Otherwise the plot returns double.nan and nothing draws. The bullish plot is a copy with every comparison reversed and the CCI at +100 or higher. Both use plot instead of def because they need to draw on the chart.

Step 6: Turn the Plots Into Arrows

Clicking Apply right after adding the 2 plots changes nothing on the chart, because ThinkorSwim doesn’t know to draw them as arrows yet. These 4 lines set the painting strategy and give the arrows a line weight of 3 so they’re easy to see.

bearishCrossOverSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
bullishCrossOverSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
bearishCrossOverSignal.SetLineWeight(3);
bullishCrossOverSignal.SetLineWeight(3);

Why the CCI Confirms the Signal

The CCI, or Commodity Channel Index, measures how far price has moved from its average, scaled by how far it usually strays. Readings above +100 or below -100 sit outside its usual range. In the video, I read +100 or higher as confidence in a bullish breakout and -100 or lower as confidence in a bearish one.

CCI() with empty parentheses runs the built-in study, with its default settings, on the symbol your chart shows. So the cross comes from the group, and the confirmation comes from your chart. In the video, I read the arrows as long or short timing for the tickers in the group, so load it on one of your 6 stocks.

Examples From the Video

The Cumulative Advance Decline example in the video uses the 6 default stocks on a daily chart. With the arrows on, I scrolled back through the group’s signals:

  • The first bearish arrow. The group fell sharply after it.
  • A recent bullish arrow. It had triggered shortly before I recorded, so the outcome wasn’t on the chart yet.
  • A bearish arrow on September 17. The group dropped soon after.

On that chart I called it a pretty reliable signal. That’s 3 arrows on one group of 6 stocks, so check the arrows on your own symbols and timeframe before you rely on them.

How I Use the Arrows

The Cumulative Advance Decline arrows are a read on the group’s momentum. In the video, I read them as the times to get long or short in the stocks that make up the group. The CCI half of each arrow comes from the chart you load the study on, so check that stock’s own chart before you act on an arrow.

An arrow doesn’t tell you where you’re wrong. Decide where your stop goes before you enter, and size the position so a stop-out costs a small, fixed share of your account.

Ways to Extend the System

The Cumulative Advance Decline study is a starting point. The average is one statistic applied to the line, and at the end of the video I suggest others you can add the same way: a standard deviation, the median, or linear regression techniques. None of them are in the download.

You can also change the 50 in Average(advDecLine,50) for a faster or slower average, or replace the 6 symbols with the stocks you trade.

Common Problems and Fixes

Most Cumulative Advance Decline problems come from a symbol, the start date, or arrows that never print.

  • A symbol doesn’t load. Check each ticker in the settings. A ticker that has changed, like FB to META, needs the new symbol.
  • The start date does nothing. The default, 2020120, is 7 digits. Enter 8 digits in YYYYMMDD format.
  • The line jumps at the start date. Bars before the date plot 0, and from the start date on, the line shows the total counted from the first bar on your chart.
  • No arrows. A cross only gets an arrow when the CCI is past +100 or -100 on the same bar, so crosses without a strong CCI reading are skipped. Scroll back further or try another timeframe.

To count only from your start date, move the date check inside the sum, the way our anchored VWAP indicator does. Replace the plot advDecLine line with the line below. This edit is my suggestion and isn’t in the video or the download:

plot advDecLine = TotalSum(if beyondStartDate then (symbol1a - symbol1b)+(symbol2a-symbol2b)+(symbol3a-symbol3b)+(symbol4a-symbol4b)+(symbol5a-symbol5b)+(symbol6a-symbol6b) else 0);

If ThinkorSwim shows an error after an edit, our tutorial on how to fix bugs in thinkScript code covers how to track it down. You’ll find more free studies on our indicators page.

Advance Decline Trading System.ts
#Written by TOS Indicators 2020
#Home of the Volatility Box
#Indicator: Anchored Cumulative Advance Decline
#References TTM_Squeeze source code in TOS and Edge Signals Source Code
#Full Course Link: tosindicators.com/squeeze-course/

#Update 12/6/20 - Fixed line #50 which contained a typo. Thanks to Karl N. and Sidd N. for catching the error.

declare lower;

input symbol_1 = "FB";
input symbol_2 = "AMZN";
input symbol_3 = "AAPL";
input symbol_4 = "NFLX";
input symbol_5 = "GOOG";
input symbol_6 = "MSFT";

#FB
def symbol1 = close(symbol_1);
def symbol11 = close(symbol_1)[1];

def symbol1a = symbol1 > symbol11;
def symbol1b = symbol1 < symbol11;

#AMZN
def symbol2 = close(symbol_2);
def symbol21 = close(symbol_2)[1];

def symbol2a = symbol2 > symbol21;
def symbol2b = symbol2 < symbol21;

#AAPL
def symbol3 = close(symbol_3);
def symbol31 = close(symbol_3)[1];

def symbol3a = symbol3 > symbol31;
def symbol3b = symbol3 < symbol31;

#NFLX
def symbol4 = close(symbol_4);
def symbol41 = close(symbol_4)[1];

def symbol4a = symbol4 > symbol41;
def symbol4b = symbol4 < symbol41;

#GOOG
def symbol5 = close(symbol_5);
def symbol51 = close(symbol_5)[1];

def symbol5a = symbol5 > symbol51;
def symbol5b = symbol5 < symbol51;

#MSFT
def symbol6 = close(symbol_6);
def symbol61 = close(symbol_6)[1];

def symbol6a = symbol6 > symbol61;
def symbol6b = symbol6 < symbol61;


input startDateYyyyMmDd = 2020120;
 def beyondStartDate = if GetYYYYMMDD() >= startDateYyyyMmDd then 1 else 0;
 plot advDecLine =  if beyondStartDate then TotalSum((symbol1a - symbol1b)+(symbol2a-symbol2b)+(symbol3a-symbol3b)+(symbol4a-symbol4b)+(symbol5a-symbol5b)+(symbol6a-symbol6b)) else totalsum(0);

plot advDecLineAvg = Average(advDecLine,50);

plot bearishCrossOverSignal = if advDecLine < advDecLineAvg and advDecLine[1] >= advDecLineAvg and CCI() <= -100 then advDecLineAvg else double.nan;

plot bullishCrossOverSignal = if advDecLine > advDecLineAvg and advDecLine[1] <= advDecLineAvg and CCI() >= 100 then advDecLineAvg else double.nan;

bearishCrossOverSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
bullishCrossOverSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
bearishCrossOverSignal.SetLineWeight(3);
bullishCrossOverSignal.SetLineWeight(3);

Want the .ts file and the one-click import? Both come with a free account.

Create Free Account Login
A cumulative advance decline line is a running total of advancing issues minus declining issues. The classic version counts every stock on an exchange each day. Our ThinkorSwim study applies the same counting to 6 symbols you choose: on each bar, a symbol that closed up adds 1, one that closed down subtracts 1, and the result is added to the running total.
Download the study or copy the code from the Code tab. In ThinkorSwim, click the Studies icon, click Create, name the study, paste in the code, then click OK and Apply. The study opens in its own panel below the chart. Open its settings to enter your 6 symbols and an 8-digit start date.
Open the study settings and type new tickers into symbol_1 through symbol_6. They are inputs, so you never have to edit the code. In the video, I swapped Facebook for Twilio, clicked OK, and the line redrew with Twilio in the group. The download defaults are FB, AMZN, AAPL, NFLX, GOOG and MSFT.
An up arrow means the cumulative line crossed above its 50-bar average while the CCI was at +100 or higher. A down arrow means it crossed below the average while the CCI was at -100 or lower. Both arrows draw on the average line at weight 3. I read them as timing for longs or shorts in the stocks in the group.
The CCI, or Commodity Channel Index, filters the crossovers. A cross through the average can mark a burst of momentum in the group, and the CCI confirms it. In the video, I treat +100 or higher as confidence in a bullish breakout and -100 or lower as confidence in a bearish one. The CCI reads the symbol on your chart, not the group.
Enter the date in the startDateYyyyMmDd input as YYYYMMDD, so December 1, 2020 is 20201201. Bars before that date plot 0. The download's default, 2020120, has only 7 digits, so every bar passes the check and the line covers your whole chart until you enter a full 8-digit date.
An arrow needs two things on the same bar: the cumulative line crossing its 50-bar average, and the CCI at +100 or more for a bullish arrow, or -100 or less for a bearish one. Crosses without a strong CCI reading are skipped. Scroll back through more history or try another timeframe, and check that all 6 symbols load.
The NYSE advance decline line counts every advancing and declining stock on the exchange, so it measures the breadth of the whole market. This study counts only the 6 symbols you enter, and each one adds at most 1 per bar. It also adds a 50-bar average and CCI-confirmed arrows, which the classic line doesn't have.

Here are some resources that you may find useful:

  • How to import a study into ThinkOrSwim (video tutorial)
  • Supply Demand Edge indicator for market internals
  • Cumulative TICK indicator
  • Anchored VWAP indicator (Episode 1 of How to thinkScript)
  • More thinkScript tutorials
Featured Tools:
Stock Volatility Box

Stock Volatility Box

Spot reversal zones across 600 stocks & ETFs.

  • Hourly & daily models
  • Powerful Live Scanner
  • Built for day traders
Futures Volatility Box

Futures Volatility Box

Pinpoint reversal zones in 10 major futures markets.

  • 5 models (incl. Scalper)
  • ThinkOrSwim & TradingView
  • SPX traders
ORB Setups

ORB Setups

Find the best Opening Range Breakout setups.

  • Powerful real-time scanner
  • Instant backtests
  • 2+ years data

Get Free Access

Create a free account for downloads and new tutorial alerts.

Create Free Account

Related tutorials and research

What Market Internals are Telling Us About Tomorrow

What Market Internals are Telling Us About Tomorrow

Research
2 Ways to Use NYSE $TICK to Spot Trend Days

2 Ways to Use NYSE $TICK to Spot Trend Days

Research
How to Build an Anchored VWAP Indicator in ThinkorSwim

How to Build an Anchored VWAP Indicator in ThinkorSwim

Indicators · Beginner
How to Build a Fair Value Gap Indicator in ThinkorSwim

How to Build a Fair Value Gap Indicator in ThinkorSwim

Indicators · Beginner-Friendly
How to Build a Heiken Ashi Trend Dots Indicator in ThinkorSwim

How to Build a Heiken Ashi Trend Dots Indicator in ThinkorSwim

Indicators · Beginner-Friendly
How to Build a Commodities Tracker in ThinkorSwim

How to Build a Commodities Tracker in ThinkorSwim

Indicators · Beginner

Ready to Trade With an Edge?

Join 40,000+ traders using institutional-grade tools for ThinkOrSwim.

Get the Bundle
TOS Indicators

Premium thinkorswim indicators, scans, and trading tools to help you trade smarter.

ThinkOrSwim Tools

  • Indicators
  • Scans
  • Backtesters
  • Dashboards
  • thinkScript
  • Browse All

Courses

  • Squeeze Course
  • Earnings Course
  • V-Shaped Reversals
  • Fibonacci Trading

Products

  • Futures Volatility Box
  • Stock Volatility Box
  • ORB Setups
  • Shop All

Guides

  • TTM Squeeze
  • Automated Trading
  • Volatility Trading
  • Opening Range Breakouts
  • Trade Reports
  • Contact Us

© 2026 TOS Indicators. All rights reserved.

Privacy Policy Terms of Service Disclaimer Accessibility

The information contained on this website is solely for educational purposes, and does not constitute investment advice. The risk of trading in securities markets can be substantial. You must review and agree to our Terms of Service prior to using this site.

U.S. Government Required Disclaimer - Commodity Futures Trading Commission. Futures and options trading has large potential rewards, but also large potential risk. You must be aware of the risks and be willing to accept them in order to invest in the futures and options markets. Don't trade with money you can't afford to lose. This website is neither a solicitation nor an offer to Buy/Sell futures or options. No representation is being made that any account will or is likely to achieve profits or losses similar to those discussed on this website. The past performance of any trading system or methodology is not necessarily indicative of future results.

Individual results may vary, and testimonials are not claimed to represent typical results. All testimonials are by real people, and may not reflect the typical purchaser's experience, and are not intended to represent or guarantee that anyone will achieve the same or similar results.

TOS Indicator's Traders and employees will NEVER manage or offer to manage a customer or individual's options, stocks, currencies, futures, or any financial markets or securities account. If someone claiming to represent or be associated with TOS Indicator solicits you for money or offers to manage your trading account, do not provide any personal information and contact us immediately.

CFTC RULE 4.41 - 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, SUCH AS LACK OF LIQUIDITY, SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN.