OPEN-SOURCE SCRIPT
Close Above/Below Prev 2 Candle Strategy (Any Timeframe)

Title: Close Above/Below Previous 2 Candle Strategy (Any Timeframe)
Description:
This strategy identifies potential breakout and trend continuation signals by analyzing the closing price relative to the highs and lows of the previous two candles. It works on any chart timeframe, making it versatile for intraday, swing, and daily trading.
How it works:
Long Entry (Bullish Signal): Triggered when the current candle closes above the highs of the previous two candles.
Short Entry (Bearish Signal): Triggered when the current candle closes below the lows of the previous two candles.
Visual Indicators:
Green triangles above the bar indicate bullish signals.
Red triangles below the bar indicate bearish signals.
Strategy Features:
Works on any timeframe, from 1-minute charts to daily/weekly charts.
Configurable risk/reward ratio for automatic stop-loss and take-profit levels.
Alerts trigger immediately when the condition is met, helping traders react to potential breakouts.
Provides clean visual signals for easy chart reading and decision-making.
Benefits:
Reduces noise by focusing on candle close confirmations.
Versatile and suitable for intraday, swing, and long-term trading.
Easy to combine with other indicators or strategies.
Description:
This strategy identifies potential breakout and trend continuation signals by analyzing the closing price relative to the highs and lows of the previous two candles. It works on any chart timeframe, making it versatile for intraday, swing, and daily trading.
How it works:
Long Entry (Bullish Signal): Triggered when the current candle closes above the highs of the previous two candles.
Short Entry (Bearish Signal): Triggered when the current candle closes below the lows of the previous two candles.
Visual Indicators:
Green triangles above the bar indicate bullish signals.
Red triangles below the bar indicate bearish signals.
Strategy Features:
Works on any timeframe, from 1-minute charts to daily/weekly charts.
Configurable risk/reward ratio for automatic stop-loss and take-profit levels.
Alerts trigger immediately when the condition is met, helping traders react to potential breakouts.
Provides clean visual signals for easy chart reading and decision-making.
Benefits:
Reduces noise by focusing on candle close confirmations.
Versatile and suitable for intraday, swing, and long-term trading.
Easy to combine with other indicators or strategies.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.