OPEN-SOURCE SCRIPT
Apex Trend & Liquidity Master with TP/SL

The Apex Trend & Liquidity Master is a systematic trading framework that identifies trend direction and key structural price levels for entry and exit decisions. The system uses a volatility-adaptive trend detection mechanism built on Hull Moving Averages with ATR-based bands to filter consolidation periods and isolate directional moves.
The liquidity detection engine identifies potential reversal zones by marking swing highs and lows that meet statistical significance thresholds. These zones represent areas where institutional order flow previously caused price rejection. Zones remain active until price closes through them, indicating mitigation of the level.
This implementation is an enhanced derivative of the original system with fully automated risk management. Stop losses are calculated using ATR multiples with entry candle wick protection as a minimum threshold, while take profits maintain a fixed 3:1 risk-reward ratio. An additional exit mechanism closes profitable positions when price reaches opposing supply or demand zones, providing early profit-taking at probable reversal points before full target completion.
Entry signals generate only on trend changes when volume exceeds average levels, reducing false breakouts in ranging conditions. The system includes complete position tracking with three distinct exit types: take profit hits, stop loss hits, and profitable zone contact exits. All calculations use confirmed historical data with no forward-looking bias, though supply/demand zone identification operates with a confirmation lag inherent to pivot point detection.
The liquidity detection engine identifies potential reversal zones by marking swing highs and lows that meet statistical significance thresholds. These zones represent areas where institutional order flow previously caused price rejection. Zones remain active until price closes through them, indicating mitigation of the level.
This implementation is an enhanced derivative of the original system with fully automated risk management. Stop losses are calculated using ATR multiples with entry candle wick protection as a minimum threshold, while take profits maintain a fixed 3:1 risk-reward ratio. An additional exit mechanism closes profitable positions when price reaches opposing supply or demand zones, providing early profit-taking at probable reversal points before full target completion.
Entry signals generate only on trend changes when volume exceeds average levels, reducing false breakouts in ranging conditions. The system includes complete position tracking with three distinct exit types: take profit hits, stop loss hits, and profitable zone contact exits. All calculations use confirmed historical data with no forward-looking bias, though supply/demand zone identification operates with a confirmation lag inherent to pivot point detection.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.