Stochastic Oscillator Trendline Indicator for MT4 & MT5
Trendlines drawn automatically on the Stochastic Oscillator in the indicator window, the same way you would connect its peaks and bottoms by hand. See when Stochastic breaks or reaches a line, and get an alert if you like.
What is the Stochastic Oscillator?
The idea: What is Stochastic?
The Stochastic Oscillator was developed by George C. Lane in the late 1950s. It shows where the close is within the high-low range of the last periods, on a scale from 0 to 100. Lane said that momentum usually changes direction before price does.
It has two lines: %K, the main line, and %D, a moving average of %K. A common setting is 14, 3, 3: the lookback period, the smoothing of %K, and the period of %D.
How traders read it
Readings above 80 are usually seen as overbought and readings below 20 as oversold. Traders watch %K crossing %D, and the oscillator leaving the 80 or 20 zone again.
What to watch for
An overbought reading is not automatically bearish: in a strong uptrend Stochastic can stay above 80 for a long time, and below 20 in a strong downtrend. Many traders only look for moves in the direction of the larger trend.
In TrueTL you set the K period, D period and slowing, the moving average method and the price used.
TrueTL Stochastic trendline indicator: how it works
TrueTL Stochastic Trendline draws trendlines in the indicator window, from the real peaks and bottoms of the main Stochastic line, the same way on every symbol and timeframe. It can mark the bar and send an alert when Stochastic breaks a line or comes close to it, and you can show all lines or only rising or falling ones. A trendline break is what many traders watch as a possible breakout. Other options include a triangle mode, lines that end at the break, and other chart events such as direction changes, level crosses and zone entries. A break on the oscillator sometimes comes before a break on the price chart, but not always, so use it together with the price chart. No repaint once a candle closes on the indicator’s timeframe.
How trendlines on an oscillator work, with examples: About the oscillator trendline.
Stochastic trendline indicator features
- PlatformsMetaTrader 4 and MetaTrader 5, any broker, demo or live account.
- Any symbolForex pairs, stocks, indices, crypto: any MT4/MT5 symbol.
- Non repaintOnce a candle closes on the indicator’s timeframe, what is drawn stays fixed.
- Works with other MetaTrader toolsStochastic values and events are available to other MetaTrader indicators and programs through the standard iCustom() function. The PDF user guide lists every value.
- Automatic Stochastic trendlinesTrendlines in the indicator window, drawn from the real peaks and bottoms of the main Stochastic line.
- Break and approachMarks the bar when Stochastic breaks a trendline or comes close to it.
- Triangle modeDraws only two trendlines, for a cleaner indicator window.
- Cut at the breakLines end where Stochastic broke them, so you see the break at a glance.
- Up, down or allShow all trendlines, only rising or only falling ones, with or without labels.
- Other timeframesCalculate Stochastic on a higher or lower timeframe and see it on your chart, with optional smoothing.
- Overbought and oversold levelsUpper and lower Stochastic levels, with an optional middle level, for display and level-cross events.
- Offline chartsWorks with Renko and other offline charts too.
- Alerts on chart eventsTrendline break and approach, Stochastic crosses, level crosses, direction changes, peaks and valleys, with 5 trigger slots. Popup, push, email, sound, Telegram, CSV log or a chart pictogram. Highly customizable: alert timing (after the candle closes, before it closes, or both), a time window, an interval limit and a test message. Alerts also work on the trendlines and horizontal lines you draw yourself.
- Strategy Tester and fast backtestingRuns in the MetaTrader Strategy Tester, also for visual backtesting. Refresh and cache modes for repeated tests: the cache mode saves the results, so a repeated test is at least 700% faster.
Common questions about the Stochastic trendline indicator
What are the best settings for the Stochastic trendline indicator?
There is no single best setting. We chose the default settings to suit most traders. The indicator has many settings so that everyone can fit it to their own needs, and if you want something different, you can customize it. The PDF manual explains every setting.
How is the Stochastic set up in TrueTL?
In TrueTL you set the K period, D period and slowing, the moving average method and the price used.
How do traders read the Stochastic?
Readings above 80 are usually seen as overbought and readings below 20 as oversold.
Is the Stochastic trendline indicator non repaint?
Once a candle closes on the indicator’s timeframe, the trendlines and break marks stay fixed. On a multi timeframe setting, the closed candle of the higher timeframe decides: on a lower timeframe a line can disappear even a few candles back. That is normal.
Does it work on MT4 and MT5?
Yes. TrueTL Stochastic Trendline is available for MetaTrader 4 and MetaTrader 5, with any broker, on demo or live accounts, and on any symbol the platform offers.
Can I get an alert?
Yes. Alerts for a trendline break or approach can come as a popup, push message, email, sound, Telegram message, CSV log line or a pictogram on the chart.
Do alerts work when my computer is off?
No. Alerts are sent by the MetaTrader terminal where the indicator runs, and MetaTrader does not run in the cloud: it runs on a computer, so the computer and MetaTrader must be on, with the indicator on a chart. If that is a problem, run MetaTrader with the indicators on a VPS (a remote Windows computer that is always on). Push messages are also sent only while MetaTrader is running, on your computer or on the VPS; they then arrive on your phone.
Is there a free version?
TrueTL Stochastic Trendline is part of the paid license; one license covers all 72 indicators. There is also a free MT4 & MT5 oscillator pack of 37 multi-timeframe oscillators. The free pack does not draw trendlines or divergences. The PDF manual is free to download.
More answers on the Support page.
One license, all 72 indicators
TrueTL Stochastic Trendline comes with the Stochastic Divergence indicator, True Trendline, True S/R Level and every other oscillator trendline and divergence indicator.


