OPEN-SOURCE SCRIPT

MinhPhan Trend Pullback Entry

173
This Pine Script strategy, "Trend Pullback Entry (Clean View)," is designed to identify pullback entries within a trending market using EMA, ADX, RSI, and VWAP. It dynamically distinguishes between trending and sideways markets by calculating the ADX (average directional index) and EMA spread, and it visually highlights trend/sideway zones with shaded boxes.

Key Logic:
Trend Detection: A trend is confirmed when ADX > Threshold and the spread between EMA Fast and EMA Slow exceeds 0.2%. Otherwise, the market is considered sideways.
Entry Conditions:
Long: When in an uptrend, price pulls back near VWAP, EMA Fast > EMA Slow, and RSI > 50.
Short: In a downtrend, price pulls back near VWAP, EMA Fast < EMA Slow, and RSI < 50.
Trade Management:
Entries are marked using strategy.entry for both long and short setups.
Exits are handled with fixed risk-reward logic: Take Profit and Stop Loss in percent, converted into price ticks using syminfo.mintick.
Visual Aids:
Box overlays distinguish trend and sideway zones.
EMA and VWAP lines guide the trend direction.
Arrows mark entry signals on the chart for both long and short setups.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.