OPEN-SOURCE SCRIPT
Pin Bar Reversal Strategy

Strategy: Pin Bar Reversal with Trend Filter
One effective high-probability setup is a Pin Bar reversal in the direction of the larger trend. A pin bar is a candlestick with a tiny body and a long wick, signaling a sharp rejection of price
By itself, a pin bar often marks a potential reversal, but not all pin bars lead to profitable moves. To boost reliability, this strategy trades pin bars only when they align with the prevailing trend – for example, taking a bullish pin bar while the market is in an uptrend, or a bearish pin bar in a downtrend. The trend bias can be determined by a long-term moving average or higher timeframe analysis.
Why it works: In an uptrend, a bullish pin bar after a pullback often indicates that sellers tried to push price down but failed, and buyers are resuming control. Filtering for pin bars near key support or moving averages further improves odds of success. This aligns the entry with both a strong price pattern and the dominant market direction, yielding a higher win rate. The pin bar’s own structure provides natural levels for stop and target placement, keeping risk management straightforward.
Example Setup:
USDCHF - 4 Hour Chart
Trend SMA 12
Max Body - 34
Min Wick - 66
ATR -15
ATR Stop Loss Multiplier - 2.3
ATR Take Profit Multiplier - 2.9
Minimum ATR to Enter - 0.0025
One effective high-probability setup is a Pin Bar reversal in the direction of the larger trend. A pin bar is a candlestick with a tiny body and a long wick, signaling a sharp rejection of price
By itself, a pin bar often marks a potential reversal, but not all pin bars lead to profitable moves. To boost reliability, this strategy trades pin bars only when they align with the prevailing trend – for example, taking a bullish pin bar while the market is in an uptrend, or a bearish pin bar in a downtrend. The trend bias can be determined by a long-term moving average or higher timeframe analysis.
Why it works: In an uptrend, a bullish pin bar after a pullback often indicates that sellers tried to push price down but failed, and buyers are resuming control. Filtering for pin bars near key support or moving averages further improves odds of success. This aligns the entry with both a strong price pattern and the dominant market direction, yielding a higher win rate. The pin bar’s own structure provides natural levels for stop and target placement, keeping risk management straightforward.
Example Setup:
USDCHF - 4 Hour Chart
Trend SMA 12
Max Body - 34
Min Wick - 66
ATR -15
ATR Stop Loss Multiplier - 2.3
ATR Take Profit Multiplier - 2.9
Minimum ATR to Enter - 0.0025
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
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.