PROTECTED SOURCE SCRIPT

INDICATOR RENKO LONG/SHORT

53
Fair Value Gap (FVG) Zones • Auto Entry & Exit Signals • Built-in Risk Management

Overview
This Pine Script® indicator automatically identifies and highlights Fair Value Gaps—price imbalances created when consecutive bars leave a “gap” between them—and offers on-chart mock entries, stop-losses, take-profits, and customizable alerts. Use it to visually spot high-probability imbalance zones, refine your entries, and maintain disciplined risk management, all without cluttering your chart.

🔍 Key Features
Dynamic FVG Detection

Scans for bullish and bearish gaps based on your lookback period and minimum size.

Automatically plots filled zones in semi-transparent green (bullish) or red (bearish).

Automated Entry & Exit Labels

BUY / SELL markers trigger when price re-enters an active FVG.

Long Exit / Short Exit markers show when your mock stop-loss or take-profit is hit.

Risk-Reward Management

Define your preferred Risk : Reward ratio (e.g. 1 : 2) and watch the script calculate targets.

Optional “Mid-Gap” entry: choose to fill at the midpoint of the gap for better average price.

Configurable Alerts

Four built-in alertconditions let you hook into TradingView alerts for:

FVG Buy

FVG Sell

Exit Long

Exit Short

⚙️ Inputs & Parameters
Setting Default Description
FVG gap lookback (bars) 2 Bars to look back when measuring gaps (min 2, max 5)
Min FVG Size (points) 2.0 Minimum gap size in price units (step 0.25)
Risk : Reward Ratio 2.0 Multiplier for target distance vs. stop-loss distance
Use Mid-Gap Entry? false If enabled, entry price = midpoint of the FVG rather than edge

📈 How to Use
Add to Chart

Copy & paste the script into TradingView’s Pine Editor (Version 6).

Adjust the inputs to match your trading style and instrument volatility.

Interpret the Zones

Green rectangles mark bullish FVGs—potential demand areas.

Red rectangles mark bearish FVGs—potential supply areas.

Follow the Labels

When price re-enters an active gap, a BUY or SELL label appears.

A Long Exit or Short Exit label appears once your mock stop or target is reached.

Set Alerts

Create alerts on any of the four conditions to receive real-time notifications.

🔔 Alerts & Automation
Use the built-in alert conditions to automate your monitoring:

FVG Buy Signal: "Fair Value Gap Buy Triggered"

FVG Sell Signal: "Fair Value Gap Sell Triggered"

FVG Exit Long: "Fair Value Gap – Long Position Exited"

FVG Exit Short: "Fair Value Gap – Short Position Exited"

⚠️ Disclaimer
This indicator is provided “as is” under the Mozilla Public License 2.0. It is intended for educational purposes and to aid in technical analysis. It is not financial advice. Always backtest and paper-trade before applying to live capital, and never risk more than you can afford to lose.

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.