Strategy · Pine Script v6 · On the chart

BTC 4h FVG/iFVG Strategy

by Minara-AI

This strategy plots on the price chart and looks for three-candle fair value gaps and inverse gaps on Bitcoin.

View on GitHub

Repaints

GitHub stars12on the repository
Pine versionv6current
Lines of code153
Settings8inputs
LicenceNone stated
Last update4 months ago11 Jun 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

BTC 4h FVG/iFVG Strategy enters long when a wide enough bullish gap appears in an uptrend with RSI above 30 and volume above its average, and short on the opposite bearish setup. Trend uses a short and a long EMA. Risk percent, an ATR stop multiplier, and a reward ratio set position risk and targets. Fresh gaps are limited to the last twenty bars. Signals use the current bar, so they can change before that bar closes.

Details

Published by

Minara-AI on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

SMC / ICT / price action, Trend, Oscillators & momentum, Volume

Markets

Crypto

Timeframes

H4 and above

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Risk per trade (%)float1.0risk_percent
ATR multiplier for SLfloat1.5atr_mult_sl
Risk:Reward ratio (RR)float2.0rr_ratio
EMA short lengthint50ema_short_len
EMA long lengthint200ema_long_len
RSI lengthint14rsi_len
Volume multiplier (above SMA)float1.2vol_mult
Min FVG width (%)float0.3fvg_min_width_pct
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

Combines an upgraded WaveTrend oscillator engine with market structure swing pivots, volume profile point of control (POC), and multi-timeframe trend alignment scoring. Trades are triggered by WaveTrend reversal or pullback continuation signals that pass conte

Strategy v6 Oscillators & momentumTrend
Updated yesterday · MIT GitHub repository of WaveTrend v3 [WavesUnchained] — Strategy

Altered OBV On MACD

by hasnocool
106 stars

This strategy calculates and plots 9, 21, 50, 90, and 200-period Simple Moving Averages on the main price chart. It constructs a modified On-Balance Volume (OBV) metric and calculates a MACD oscillator based on this custom volume series rather than price. Long

Strategy v5 Moving averagesVolume
Updated 2 years ago · GPL-3.0 GitHub repository of Altered OBV On MACD
57 stars

This strategy identifies trend reversals through market structure changes (CHoCH) filtered by MACD momentum. It initiates long positions on bullish structure breaks when MACD is positive and above its signal line, and short positions on bearish breaks when MAC

Strategy v6 SMC / ICT / price actionOscillators & momentum Repaints
Updated 1 year ago · Apache-2.0 GitHub repository of Market Structure MACD 4H + Trailing

Combined Strategy

by Dropio12
7 stars

This strategy plots buy and sell markers on the price chart by combining a fast and slow ALMA crossover with a simple close-to-close momentum check. A long marker appears when the fast ALMA crosses above the slow ALMA and momentum is positive. A short marker a

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Combined Strategy

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers