OPEN-SOURCE SCRIPT
Mariam Smart Flip

Purpose
This tool identifies high-probability intraday reversals by detecting when price flips through the daily open after strong early-session commitment.
How It Works
A valid flip occurs when:
This setup is designed to catch liquidity grabs or fakeouts near the daily open, where early buyers or sellers get trapped after showing commitment
Signal Logic
Buy Flip
Previous day bearish → first hour bearish → price flips above open
Sell Flip
Previous day bullish → first hour bullish → price flips below open
Features
Usage Tips
This tool identifies high-probability intraday reversals by detecting when price flips through the daily open after strong early-session commitment.
How It Works
A valid flip occurs when:
- The previous daily candle is bullish or bearish
- The first hour today continues in the same direction
- Then, the price flips back through the daily open with a minimum break threshold (user-defined)
This setup is designed to catch liquidity grabs or fakeouts near the daily open, where early buyers or sellers get trapped after showing commitment
Signal Logic
Buy Flip
Previous day bearish → first hour bearish → price flips above open
Sell Flip
Previous day bullish → first hour bullish → price flips below open
Features
- Configurable flip threshold in percentage
- Signals only activate after the first hour ends
- Daily open line displayed on chart
- Simple triangle markers with no visual clutter
- Alerts ready to use for automation or notifications
Usage Tips
- Use "Once Per Bar" alert mode to get notified immediately when the flip happens
- Works best in active markets like FX, indices, or crypto
- Adjust threshold based on asset volatility
- Suggested stop loss: use the previous daily high for sell flips or the previous daily low for buy flips
- Suggested take profit: secure at least 30 pips to aim for a 1:3 risk-to-reward ratio on average
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.