OPEN-SOURCE SCRIPT

Medium Term Weighted Stochastic (STPMT) by DGT

アップデート済
La Stochastique Pondérée Moyen Terme (STPMT), or Mᴇᴅɪᴜᴍ Tᴇʀᴍ Wᴇɪɢʜᴛᴇᴅ Sᴛᴏᴄʜᴀꜱᴛɪᴄꜱ created by Eric Lefort in 1999, a French trader and author of trading books

█ The STPMT indicator is a tool which concerns itself with both the direction and the timing of the market. The STPMT indicator helps the trader with:
  • The general trend by observing the level around which the indicator oscillates
  • The changes of direction in the market
  • The timing to open or close a position by observing the oscillations and by observing the relative position of the STPMT versus its moving average


STPMT Calculation
stpmt = (4,1 * stoch(5, 3) + 2,5 * stoch(14, 3) + stoch(45, 14) + 4 * stoch(75, 20)) / 11.6

Where the first argument of the stoch function representation above is period (length) of K and second argument smoothing period of K. The result series is then plotted as red line and its moving average as blue line. By default disabled gray lines are the components of the STPMT


The oscillations of the STPMT around its moving average define the timing to open a position as crossing of STMP line and moving average line in case when both trends have same direction. The moving average determines the direction.

Long examples
スナップショット
スナップショット



█  Tʜᴇ CYCLE Iɴᴅɪᴄᴀᴛᴏʀ is derived from the STPMT. It is



It is indicates more clearly all buy and sell opportunities. On the other hand it does not give any information on market direction. The Cycle indicator is a great help in timing as it allows the trader to more easily see the median length of an oscillation around the average point. In this way the traders can simply use the time axis to identify both a favorable price and a favorable moment. The Cycle Indicator is presented as histogram


The Lefort indicators are not a trading strategy. They are tools for different purposes which can be combined and which can serve for trading all instruments (stocks, market indices, forex, commodities…) in a variety of time frames. Hence they can be used for both day trading and swing trading.


👉 For whom that would like simple version of the Cycle indicator on top of the main price chart with signals as presented below.
Please note that in the following code STMP moving average direction is not considered and will plot signals regardless of the direction of STMP moving average. It is not a non-repainting version too.

スナップショット

here is pine code for the overlay version


リリースノート
Update with the new resolution_gaps parameter for the study() declaration statement introduced just few hours ago, which allows you to control gaps when using the resolution parameter to access higher timeframes. Requested data is merged continuously without gaps, all the gaps are filled with the previous nearest existing values
リリースノート
Organized Script Inputs in Sections, thnaks to TradingView's latest update
リリースノート
Update

This update combines @midtownsk8rguy ‘s developed TrendFlex Oscillator with Medium Term Weighted Stochastic (STPMT) suggested and highly tested by @sandyrindal.

Based on sandyrindal’s findings
By adding TrendFlex Oscillator you added a very sharp edge which adds conviction, confirmation, helps stay in trade for longer. On a longer time frame if TrendFlex Oscillator is completely below of STPMT and its average then it is complete downtrend...and if it’s completely above STPMT and its average it is complete uptrend...do not exit the trend as long as TrendFlex Oscillator turn and crosses its upper and lower limits

Thanks a lot for the suggestion sandyrindal, and @midtownsk8rguy thanks for granting permission to use your high quality study 🙏
cycleDGTlefortStochastic OscillatorstpmtTrend Analysistrendflexweightedstoch

オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

チャートでこのスクリプトを利用したいですか?

免責事項