Skip to content

    McGinley Dynamic Indicator: Formula, Worked Reliance Example and Settings

    Quick answer

    Run the McGinley Dynamic formula on real Reliance closes with N 10, compare it to SMA and EMA, and see settings, signals and Indian tax for NSE traders.

    19 June 2026
    15 min read
    2,982 words

    Key Takeaways

    • 1.The McGinley Dynamic is a self adjusting moving average. Its formula speeds up when price falls fast and slows down when price rises, so it hugs the trend without the whipsaws of a plain moving average.
    • 2.The full formula is MD = MD_prev + (Close - MD_prev) / (N x (Close / MD_prev) raised to the power 4). The fourth power term is what makes it adaptive.
    • 3.In our worked Reliance example over 11 daily closes with N equal to 10, the McGinley line moved from 1402.00 to 1432.73 while the SMA(10) sat at 1446.65 and the EMA(10) at 1452.05. The McGinley line lagged the most, which is exactly why it produces fewer false flips.
    • 4.It works best as a trend filter and trailing reference, not as a fast intraday signal generator. Pair it with RSI or volume for confirmation.
    • 5.For F and O positions taxes still apply normally. F and O profit is business income taxed at your slab, intraday equity is speculative business income, and delivery gains attract 20 percent STCG or 12.5 percent LTCG above Rs 1.25 lakh. All numbers here are illustrative and not a promise of returns.

    What the McGinley Dynamic actually is

    The McGinley Dynamic is a moving average that adjusts its own speed. John R. McGinley built it because a normal 10 day or 20 day moving average uses a fixed lookback, so it always lags by the same amount no matter what the market is doing. When a stock like Reliance gaps up on results, a fixed average crawls behind and gives a late signal. When the same stock crashes, the fixed average is too slow to protect you. The McGinley Dynamic tries to fix both problems with one equation.

    The key idea is a ratio between the current close and the previous McGinley value. When price is rising faster than the line, that ratio is greater than 1, the denominator grows, and the line takes smaller steps so it does not chase a spike. When price falls below the line, the ratio drops below 1, the denominator shrinks, and the line speeds up to follow the decline. This asymmetry is deliberate. McGinley wanted a line that protects capital on the way down while staying patient on the way up.

    On Indian indices and stocks this matters because our market has sharp event driven moves. Budget day, RBI policy, monthly F and O expiry on the last Thursday, and quarterly results all create one day spikes that fool ordinary averages. A smoother adaptive line filters that noise so you are not flipping your bias every other session.

    The exact formula, term by term

    The standard McGinley Dynamic formula is: MD = MD_prev + (Close - MD_prev) / (N x (Close / MD_prev) ^ 4). Here MD_prev is yesterday value of the line, Close is today closing price, and N is the chosen period such as 10 or 14. The caret 4 means raised to the fourth power. Many charting platforms internally multiply N by a constant near 0.6, but the version above is the widely published one and is what we use in the worked example below so you can reproduce every number by hand.

    • MD_prev is the seed. On the very first bar there is no previous value, so most platforms set the first McGinley value equal to the first close. We do the same.
    • (Close - MD_prev) is the raw gap between price and the line. A big gap means a big potential adjustment.
    • (Close / MD_prev) ^ 4 is the adaptive brake. Above 1 it grows fast and slows the line. Below 1 it shrinks fast and speeds the line up.
    • N is your period. Smaller N reacts quicker, larger N is smoother. Common Indian settings are 10 for swing trading and 14 to 20 for positional.
    Power of four is sensitive

    Because the ratio is raised to the fourth power, even a 2 percent move in price changes the denominator noticeably. A ratio of 1.02 becomes about 1.082 after the fourth power, so the line slows down meaningfully. Do not be surprised that the McGinley line lags more than an EMA in a fast rally. That extra patience is the whole point.

    Worked example on Reliance: running the formula on real closes

    Let us run the McGinley Dynamic by hand on a series of Reliance Industries (RELIANCE) daily closes with N equal to 10. The closes below are illustrative levels in the rough zone Reliance has traded in recent sessions, chosen so you can verify the arithmetic yourself. We seed the line with the first close of 1402.00.

    DayClose (Rs)Ratio = Close / MD_prevDenominator = 10 x Ratio^4McGinley Dynamic (Rs)
    11402.00seedseed1402.00
    21410.501.0060610.24471402.83
    31421.001.0129510.52831404.56
    41418.001.0095710.38841405.85
    51435.001.0207310.85561408.54
    61448.001.0280211.16871412.07
    71442.001.0212010.87521414.82
    81460.001.0319311.33981418.80
    91475.001.0396111.68091423.62
    101469.001.0318811.33751427.62
    111488.001.0423011.80221432.73

    Take Day 5 as a fully worked single step so you can see the mechanics. Yesterday the line was 1408.54 is the result, but let us compute it. MD_prev was 1405.85 from Day 4 and today close is 1435.00. The ratio is 1435.00 divided by 1405.85, which equals 1.02073. Raise that to the fourth power to get about 1.08556. Multiply by N of 10 to get a denominator of 10.8556. The adjustment is (1435.00 minus 1405.85) divided by 10.8556, which is 29.15 divided by 10.8556, or about 2.69. Add that to 1405.85 and the new McGinley value is 1408.54.

    Notice what happened. Reliance jumped 29.15 rupees from the line in one day, but the McGinley line only stepped up by 2.69 rupees. It refused to chase the spike. By Day 11 the close is 1488.00 while the McGinley line is only at 1432.73, so price is sitting a healthy 55 rupees above the line. Price above the line equals uptrend, and because the line is smooth you are not getting jerked out on the small red day at Day 7 or Day 10.

    McGinley versus SMA and EMA on the same Reliance data

    To see why traders bother with this indicator, compare the three lines at the end of the same 11 day Reliance series. The simple moving average and exponential moving average both react faster, which sounds good until you remember that faster also means more false flips during choppy phases.

    LineValue on Day 11 (Rs)Distance below close 1488Behaviour
    McGinley Dynamic (N 10)1432.7355.27Smoothest, lags most, fewest whipsaws
    EMA (10)1452.0535.95Reacts fastest, more sensitive to spikes
    SMA (10)1446.6541.35Equal weight, moderate lag

    All three correctly say Reliance is in an uptrend because price is above every line. The difference shows up in trade management. If price pulls back 20 rupees tomorrow to around 1468, it would still be above the McGinley line at 1432 and above the SMA at 1446, but it would be brushing the EMA. A McGinley follower keeps the position. An EMA follower might exit early and miss the next leg. The McGinley line trades a little extra lag for a lot less noise, which is the right deal for swing and positional traders.

    A second step showing the down side asymmetry

    The McGinley line behaves differently when price falls, and that is by design. Suppose on a Nifty proxy the previous McGinley value is 1475 and today close is 1450, using N of 14. The ratio is 1450 divided by 1475 equals 0.98305. The fourth power is about 0.93391. The denominator is 14 times 0.93391 equals 13.0747. The adjustment is (1450 minus 1475) divided by 13.0747, which is minus 25 divided by 13.0747, or about minus 1.91, giving a new line of 1473.09.

    Now compare the mirror image up move. If MD_prev is 1450 and price rises to 1475 with the same N of 14, the ratio is 1.01724, the fourth power is 1.07077, the denominator is 14.99, and the adjustment is only plus 1.67, giving a line of 1451.67. The exact same 25 rupee move produced a 1.91 rupee shift on the way down but only a 1.67 rupee shift on the way up. The line moves more eagerly down than up, which helps a trailing stop catch a reversal faster than it would chase a rally. This subtle bias is the McGinley signature.

    Reproduce it in a spreadsheet

    Put your closes in column A. In B2 type the first close as the seed. In B3 type =B2+(A3-B2)/(10*(A3/B2)^4) and drag it down. You now have a working McGinley Dynamic for any NSE stock or index. Change the 10 to test 14 or 20.

    Best period settings for Indian instruments

    There is no single best setting, only settings matched to your holding period and the volatility of the instrument. Bank Nifty and broker stocks move faster than FMCG names like Hindustan Unilever, so they often warrant a slightly shorter period. The table gives sensible starting points that you should then backtest on your own data before risking money.

    Use casePeriod NTypical instrumentWhy
    Intraday on index8 to 10Nifty, Bank Nifty futuresFaster response for same day trends
    Swing trading10 to 14Reliance, HDFC Bank, TCSBalance of smoothness and signal
    Positional and investing20 to 25Nifty 50 stocks, ETFsFilters noise, holds the main trend
    High volatility sector8 to 10PSU banks, Adani groupQuicker exits in violent moves
    • Start with N equal to 14 if you are unsure. It is a reasonable middle setting for most NSE swing trades.
    • For Bank Nifty intraday, shorter periods near 8 to 10 react to the index sharp swings without becoming a pure price line.
    • For long term ETF or index fund timing, 20 to 25 keeps you in the trend through normal pullbacks and avoids overtrading.

    Turning the line into trades with confirmation

    The basic rule is that a close above the McGinley line favours longs and a close below favours shorts. But used alone on Indian stocks the McGinley line will still trap you in range bound weeks, the same weakness every trend tool has. The fix is to require a second independent reason before you act, so you ignore the marginal cross that has no momentum behind it.

    • Long setup: price closes above the McGinley line AND the 14 period RSI is above 50 AND volume is above its 20 day average. This filters out weak crosses on thin days.
    • Short setup: price closes below the line AND RSI is below 50 AND the line itself has started to tilt down for two or more sessions.
    • Trailing exit: use the McGinley line as a trailing stop reference. Exit a long only on a daily close back below the line, not on an intraday wick, since the line is meant to ignore spikes.

    In our Reliance example the Day 11 close of 1488 sits 55 rupees above the line with a clean run of higher McGinley values from 1402 to 1432, so a long that was entered earlier stays valid. You would only start worrying about the trend if a daily close came back under roughly 1433 and the line flattened. That is a concrete, rule based exit rather than a gut feel.

    Position sizing and a realistic rupee outcome

    Suppose you used the McGinley signal to go long one lot of Nifty futures, where the lot size is 65. You enter when Nifty closes above the line at an illustrative 23,000 and the line trails you out on a close below it at 23,300. That is a 300 point move captured. The gross profit is 300 multiplied by 75, which equals Rs 22,500 on one lot. This is illustrative and not a forecast.

    Now subtract real costs so the number is honest. On futures, STT is charged at 0.02 percent on the sell side of the notional value. The sell notional is roughly 23,300 times 75 equals about 17.48 lakh, so STT is about Rs 350. Add exchange transaction charges, GST on brokerage and exchange charges, SEBI turnover fees, and stamp duty on the buy side, plus your broker flat fee of around Rs 20 per executed order. For a discount broker the all in cost on a single Nifty futures round turn typically lands near Rs 450 to Rs 550. So a Rs 22,500 gross becomes roughly Rs 21,950 to Rs 22,050 net before tax.

    How this profit is taxed

    F and O trading is treated as a business, so this gain is non speculative business income added to your total income and taxed at your slab rate, not at the 20 percent STCG rate that applies to delivery equity. You can also set off F and O losses and claim genuine expenses. Intraday equity, by contrast, is speculative business income. Always confirm with a CA for your situation.

    Where the McGinley Dynamic fails

    No indicator is magic and the McGinley line has two honest weaknesses. First, in a sideways or range bound market price keeps crossing the line back and forth with no follow through, producing losing signals. Indian indices spend long stretches consolidating before expiry week or ahead of major events, and a pure McGinley cross strategy bleeds money in those phases. This is why the confirmation filters above exist.

    Second, the line is smooth on purpose, which means it lags at the very turn. At a sharp top or bottom the McGinley line keeps you in slightly longer than a fast EMA would, so you give back some open profit before the exit triggers. Accept this as the cost of avoiding dozens of false flips. If you need to catch the exact top, the McGinley Dynamic is the wrong tool. If you want to ride the meat of a trend with fewer shakeouts, it is well suited.

    Market conditionMcGinley Dynamic performance
    Strong trending up or downHigh. Hugs the trend, few whipsaws
    Sideways or range boundLow. Repeated false crosses, needs filters
    Sharp reversal at a peakModerate. Lags at the turn, gives back some profit
    High volatility event daysModerate to good. Smoothing absorbs single day spikes

    Practical checklist before you use it live

    • Backtest the exact N you plan to use on at least one to two years of daily data for your specific instrument. Do not assume the textbook 14 is best for your stock.
    • Always pair the line with one momentum filter such as RSI and one volume check to cut range bound losses.
    • Use daily closes for entries and exits, not intraday wicks, so the smoothing works as intended.
    • Size positions so a single losing trade risks no more than 1 to 2 percent of capital, and account for STT, brokerage, GST and stamp duty in your expected value.
    • Keep a trade journal recording the McGinley value, the close, your filters and the rupee result, so you can audit whether the indicator actually adds edge for you.

    Always confirm current contract specifications, lot sizes, STT rates and tax rules on the official source before you trade, since SEBI, the exchanges and the Budget revise them periodically. The lot sizes and rates used here reflect recent levels and are provided for education only.

    Sources and further reading

    For authoritative data and further reading refer to Zerodha Varsity, Investopedia and NSE India. You can also study related tools such as the Relative Strength Index and learn risk management to combine with this line.

    Sources and Further Reading

    For authoritative data and further reading on this topic, refer to Zerodha Varsity, Investopedia and NSE India. Always confirm current rules, rates and contract specifications on the official source before you trade.

    Related Topics

    McGinley DynamicIndian stock marketNSEBSEtechnical indicatorNiftyBank Nifty

    Related Articles