OPEN-SOURCE SCRIPT

Protection Price (Wenhua / TDX)

288
A short-term support and stop-loss reference line adapted from the Wenhua/TDX trading platform community formula.

— FORMULA —

Protection Price = ( Close[2] + Close[1] + Open ) / 3

That is, the average of the two prior bars' closes and the current bar's open.

— INTERPRETATION —

• When price holds above the line, short-term structure favors continuation of the prevailing trend.
• A clean break below the line, particularly with expanding range or volume, often precedes a deeper pullback.
• Useful as a soft stop-loss anchor for swing positions.

— TIMEFRAME NOTE —

This indicator was designed for daily charts, where the three input bars span three trading sessions and carry meaningful overnight gap information. On lower intraday timeframes (5m, 15m) the line will naturally track close to price, behaving like a three-bar smoothing — this is expected, not a bug. For a true daily-level Protection Price displayed on an intraday chart, request the daily series via request.security().

— BEST PAIRED WITH —

"D/K Strength + Smart Money Accumulation" sub-chart indicator for complete entry and exit context.

A faithful Pine v6 port of the original community formula.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.