OPEN-SOURCE SCRIPT
IU Gap Fill Strategy

The IU Gap Fill Strategy is designed to capitalize on price gaps that occur between trading sessions. It identifies gaps based on a user-defined percentage threshold and executes trades when the price fills the gap within a day. This strategy is ideal for traders looking to take advantage of market inefficiencies that arise due to overnight or session-based price movements. An ATR-based trailing stop-loss is incorporated to dynamically manage risk and lock in profits.
USER INPUTS
Percentage Difference for Valid Gap - Defines the minimum gap size in percentage terms for a valid trade setup. ( Default is 0.2 )
ATR Length - Sets the lookback period for the Average True Range (ATR) calculation. (default is 14 )
ATR Factor - Determines the multiplier for the trailing stop-loss, helping in risk management. ( Default is 2.00 )

LONG CONDITION

SHORT CONDITION

LONG EXIT
An ATR-based trailing stop-loss is set below the entry price and dynamically adjusts upwards as the price moves in favor of the trade.
The position is closed when the trailing stop-loss is hit.

SHORT EXIT
An ATR-based trailing stop-loss is set above the entry price and dynamically adjusts downwards as the price moves in favor of the trade.
The position is closed when the trailing stop-loss is hit.

WHY IT IS UNIQUE
HOW USERS CAN BENEFIT FROM IT
USER INPUTS
Percentage Difference for Valid Gap - Defines the minimum gap size in percentage terms for a valid trade setup. ( Default is 0.2 )
ATR Length - Sets the lookback period for the Average True Range (ATR) calculation. (default is 14 )
ATR Factor - Determines the multiplier for the trailing stop-loss, helping in risk management. ( Default is 2.00 )
LONG CONDITION
- A gap-up occurs, meaning the current session opens above the previous session’s close.
- The price initially dips below the previous session's close but then recovers and closes above it.
- The gap meets the valid percentage threshold set by the user.
- The bar is not the first or last bar of the session to avoid false signals.
SHORT CONDITION
- A gap-down occurs, meaning the current session opens below the previous session’s close.
- The price initially moves above the previous session’s close but then closes below it.
- The gap meets the valid percentage threshold set by the user.
- The bar is not the first or last bar of the session to avoid false signals.
LONG EXIT
An ATR-based trailing stop-loss is set below the entry price and dynamically adjusts upwards as the price moves in favor of the trade.
The position is closed when the trailing stop-loss is hit.
SHORT EXIT
An ATR-based trailing stop-loss is set above the entry price and dynamically adjusts downwards as the price moves in favor of the trade.
The position is closed when the trailing stop-loss is hit.
WHY IT IS UNIQUE
- Precision in Identifying Gaps - The strategy focuses on real price gaps rather than minor fluctuations.
- Dynamic Risk Management - Uses ATR-based trailing stop-loss to secure profits while allowing the trade to run.
- Versatility - Works on stocks, indices, forex, and any market that experiences session-based gaps.
- Optimized Entry Conditions - Ensures entries are taken only when the price attempts to fill the gap, reducing false signals.
HOW USERS CAN BENEFIT FROM IT
- Enhance Trade Timing - Captures high-probability trade setups based on market inefficiencies caused by gaps.
- Minimize Risk - The ATR trailing stop-loss helps protect gains and limit losses.
- Works in Different Market Conditions - Whether markets are trending or consolidating, the strategy adapts to potential gap fill opportunities.
- Fully Customizable - Users can fine-tune gap percentage, ATR settings, and stop-loss parameters to match their trading style.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Shivam mandai
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Shivam mandai
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.